Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am facing a problem in QV11 to figure out the difference between two timestamps, for e.g. (column1) 04-08-2012 05:12:11 AM - (column2) 04-08-2012 05:11:11 PM.
Kindly help me out. Thank you in advance.
Regards
Ram
'DD-MM-YYYY hh:mm:ss tt'
=Date(Date#('Fieldname1','DD-MM-YYYY hh:mm:ss tt'),'DD-MM-YYYY hh:mm:ss tt')-
Date(Date#('Fieldname2','DD-MM-YYYY hh:mm:ss tt'),'DD-MM-YYYY hh:mm:ss tt')
Would be helpful if you could tell us what you get and what you expect when using which expression / script snippet.
I am mostly repeating my above post (just adding your two sample values to two sample fields), but this still seems to return a reasonable result:
SET TimestampFormat='DD-MM-YYYY hh:mm:ss TT';
LOAD
column1,
column2,
interval(column1-column2) as TimeStampDiff
INLINE [
column1, column2
04-08-2012 05:12:11 AM,04-08-2012 05:11:11 PM
];
Guys,
Im facing the same problem. Is it possible to remove the AM and take 16:00:00 instead on 4:00:00 PM
Thanks.
Mpho