Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning,
I would like to convert the following date to YYYYMM but am struggling to find the right format:
31JAN2015:00:00:00
I have searched on the community but have not come across the right example. Has anyone converted this type of timestamp yet?
Thank you,
L
May be try this:
Date(MonthStart(Date#(Left(Trim(TimeStampField), 9), 'DDMMMYYYY')), 'YYYYMM') as TimeStampField
Is it coming from Field or just this value only?
You may try like this?
=date(date#(YourField, 'NativeFormat'),'RequiredFormat')
May be try this:
Date(MonthStart(Date#(Left(Trim(TimeStampField), 9), 'DDMMMYYYY')), 'YYYYMM') as TimeStampField
Hi,
Try this..
=Date(Date#('31JAN2015:00:00:00','DDMMMYYYY:hh:mm:ss'),'YYYYMM')
I would suggest using MonthStart or MonthEnd because if you don't then may be you still see YYYYMM, it would still show up as multiple entries in list box or straight table because the date can still be different. With MonthStart we will essentially making all the dates within that month equal to 1.
Thanks sunindia Noted. i will keep it..
Thank you Sunny That worked perfectly!
Not a problem. I am glad I was able to help