Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
How to convert below date into date, year, month, time of the day sale occurs:
2013-06-14 16:42:42 +1000
BR,
SAK
Month( Date#( YOURDATEFIELD,'MMM') ) as Month
Year( Date#( YOURDATEFIELD,'YYYY') ) as Year
Day( Date#( YOURDATEFIELD,'DD') ) as Day
or like this:
Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'M/D/YYYY') as CreatedDate
Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'YYYY') as Year
Date( Floor( Timestamp#( '2013-06-14 16:42:42', 'YYYY-MM-DD hh:mm:ss')), 'MMM') as Month
and so on
and if you want to convert the date into the numerical representation of QlikView you can use the following: num(DayStart(yourTimeStamp))
Hi
Try this in your load statement:
Date(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As DaleDate,
Year(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Year,
Month(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Month,
Day(Date#(SubField(DateField, ' ', 1), 'YYYY-MM-DD')) As Day,
Time(Time#(SubField(DateField, ' ', 2), 'HH:MM:SS')) As Time
Regards
Jonathan