QV12 SR3
I have the following Datetime field
MyDatetime | Date | Time |
---|---|---|
10/01/2011 12:02:07 | 10/01/2011 | 12:02 |
I want to extract the Date and Time from it but i only want the hh:mm part of the time (like above)
I can get the date with this...
Date(Floor(MyDatetime))
i thought this might help me get the time portion i need but i'm missing something somewhere...
Time(Time#(Frac(MyDatetime),'hh:mm:ss'),'hh:mm')
check with :
=Timestamp(MyDatetime)
date(date#('10/01/2011 12:02:07','DD/MM/YYYY hh:mm:ss'),'DD-MM-YYYY') as Date,
Timestamp(date#('10/01/2011 12:02:07','DD/MM/YYYY hh:mm:ss'),'hh:mm') as Time
May be this:
Time(Round(Frac(MyDateTime), (1/24*60))) as Time
or
Time(Floor(Frac(MyDateTime), (1/24*60))) as Time
use like this:
=Timestamp(MyDatetime,'hh:mm')
Only this much should work bcs your MyDatetimeis proper format I guess
Thanks
Thanks all
Timestamp(MyDatetime,'hh:mm') works nicely
the others didn't seem to quite work but interesting
The simple wat to check wthr u can go ahead and use Date and time functions bfr jumping into string fns,any function on dates is to add the date column in to list box then check if the values r falling on right side of list box then Qlik has taken it as date,if values fall on left side of list box then Qlik didn't.
Plss check HIC docs on date.Thanks