Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a date format as "Apr 2 2011 12:00 AM", how can I convert this into "YYYYMMDD"? The time is always12:00 AM.
Thanks.
see attachment
Hi,
Write some thing like
load *,
date( date#([Fiscal Week Ending Date], 'MMM DD YYYY hh:mmTT'), 'YYYYMMDD h:mm:ss TT' );
LOAD [Fiscal Week Ending Date],
FormattedDate
FROM your location
Thanks & Regards
This works for two digit 'DD". If you scroll down your QVW , you will see result has not populated for one digit day.
if you have different format, use the alt function
date(
alt(
date#([Fiscal Week Ending Date], 'MMM DD YYYY hh:mmTT'),
date#([Fiscal Week Ending Date], 'MMM D YYYY hh:mmTT')
)
, 'YYYYMMDD' )
Awesome