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
Try something like this in your script
SET TimestampFormat='DD-MM-YYYY hh:mm:ss TT';
LOAD
field1,
field2,
interval(field1-field2) as TimeStampDiff
FROM YourTable;
Or in a chart expression
=interval(field1-field2)
=Date('04-08-2012 05:12:11','DD-MM-YYYY hh:mm:ss') -Date('04-08-2012 05:11:11','DD-MM-YYYY hh:mm:ss')
Hi,
Try this
=Interval(Num(Date#('04-08-2012 05:11:11 PM', 'DD-MM-YYYY hh:mm:ss tt')) - Num(Date#
('04-08-2012 05:12:11 AM', 'DD-MM-YYYY hh:mm:ss tt')))
will give you result as 11:59:00
Hope this helps you.
Regards,
Jagan.
Hi,
Try this
=Interval(Num(Date#('04-08-2012 05:11:11 PM', 'DD-MM-YYYY hh:mm:ss tt')) - Num(Date#
('04-08-2012 05:12:11 AM', 'DD-MM-YYYY hh:mm:ss tt')))
will give you result as 11:59:00
Hope this helps you.
Regards,
Jagan.
Thank you sparing your time for this. I think AM PM thing is not used in your answer, even hourly difference need to be tracked.
Nice it works if its hardcoded..can we do the same dynamically...?
Thank you very much for your solution and time
Yes instead of time add the fieldname
with column name its not giving me correct output
Can you send the date format of the field