Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have date field in this format: DD-Mon-YY. For example: 24-Oct-2013.
From this I need to fetch, Day, Quarter, Month and Year.
How to do it in script level? Please help.
Regards!
Use below in your script...
Date(Date#(Date, 'DD-MMM-YYYY') ) as Date,
Month(Date#(Date, 'DD-MMM-YYYY') ) as Month,
Year(Date#(Date, 'DD-MMM-YYYY') ) as Year,
Day(Date#(Date, 'DD-MMM-YYYY') ) as Day,
'Q' & Ceil(Month(Date#(Date, 'DD-MMM-YYYY') ) /3) as Quarter
Use below in your script...
Date(Date#(Date, 'DD-MMM-YYYY') ) as Date,
Month(Date#(Date, 'DD-MMM-YYYY') ) as Month,
Year(Date#(Date, 'DD-MMM-YYYY') ) as Year,
Day(Date#(Date, 'DD-MMM-YYYY') ) as Day,
'Q' & Ceil(Month(Date#(Date, 'DD-MMM-YYYY') ) /3) as Quarter
Day(Yourdatefield) as Day
Month(Yourdatefield) as Month
Year(Yourdatefield) as Year
'Q' & Ceil(Month(Yourdatefield) ) /3)
Hope this helps
Thank you Manish and Anand for the quick help!!
Or another way also
Year(Date#('24-Oct-2013','DD-MMM-YYYY'))
Month(Date#('24-Oct-2013','DD-MMM-YYYY'))
Day(Date#('24-Oct-2013','DD-MMM-YYYY'))
'Q' & Ceil(Month(Date#('24-Oct-2013','DD-MMM-YYYY'))/3)
Hope this helps