Converting DATETIME(Date Time) to Quarter(int) SSIS

437 Views Asked by At

I need to convert datetime to Quarter. I have date time as the date type - 2009-01-01 00:00:00.000

how do I convert this 01 to Quarter "1" for example?

1

There are 1 best solutions below

0
On

Per the documentation you can use the datepart function with the q or qq argument:

datepart("q", YourDateColumn)