Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I am new to qlikview.I have timestamp value in field as '17-11-2014-00h:42m:21s'
i want to remove the date as well as h,m,s from the time value and only display '42:21'
Thanking u guys in advance.
One small suggestion to your solution:
time(frac(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss')),'mm:ss')
This way the resulting time value will be independent from the date part, e.g. using the time as dimension would only create one row per time.
Hope this helps
Regards
Marco
Hi,
Try like
timestamp(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss'),'mm:ss')
or
time(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss'),'mm:ss')
If you required hours also then add "hh" in timestamp() and time()
Regards
=Replace(TextBetween('17-11-2014-00h:42m:21s',':','s'),'m','')
One small suggestion to your solution:
time(frac(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss')),'mm:ss')
This way the resulting time value will be independent from the date part, e.g. using the time as dimension would only create one row per time.
Hope this helps
Regards
Marco
What if i want to make it as a field tht contains all the values
i tried in the edit script 'time(frac(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss')),'mm:ss') as Time' but the time field wont show any values.
Hi,
timestamp(timestamp#(purgechar(datefield,'hms'),'DD-MM-YYYY-hh:mm:ss'),'DD-MM-YYYY-hh:mm:ss')
Regards