Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have a date column and want to extract quarter information from this. The date is is the YYYYMMDD format.
thanks
Hey thank you so much. Its working fine.. ☺
Try this:
date(makedate(left(Date_Field,4),mid(Date_Field,5,2),Right(Date_Field,2)),'DD-MM-YYYY')
It will convert YYYYMMDD into DD-MM-YYYY and after that try applying ceil function.
Try like:
Load *,
'Q' & Ceil(fMonth/3) as Quarter;
Load
Mod(Month(Date#(YourDateField, 'YYYYMMDD')) -11, 12)+1 as fMonth,
Month(Date#(YourDateField, 'YYYYMMDD')) as Month
From <>;
Here if you select Nov from Month field, it will associate '1' in the fMonth field.