Traditional Culture Encyclopedia - Hotel accommodation - How to intercept the year and month in date-time format

How to intercept the year and month in date-time format

This needs to be converted through convert.

Choice? SUM(BO _ UDDataPickUpReport _ stsfcmain . fin quantity)?

From where? BO _ UDDataPickUpReport _ STSFCMain?

Group? By who? BO _ UDDataPickUpReport _ stsfcmain . cinv code,

CONVERT(VARCHAR(6),BO _ UDDataPickUpReport _ stsfcmain . ddate, 1 12)

In fact, you can see the result.

Choice? Convert (varchar (6), getdate (), 1 12) varchar (6) is the place where the length is limited to the first six digits.