Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to find the time lapsed between two times which are basically the start and end times, and display it(Table) in the "hhmmss' Format.
1. 12:55:54 PM
2. 12:59:45 PM
Interval(Time2 - Time1, 'hhmmss')
Interval(Time2 - Time1, 'hhmmss')
If your time fields are text, then
Interval(Time#(Time2, 'hh:mm:ss TT')-Time#(Time1, 'hh:mm:ss TT'),''hhmmss')
either in a straight table or in the load script as:
Interval(Time#(Time2, 'hh:mm:ss TT')-Time#(Time1, 'hh:mm:ss TT'),''hhmmss') as Interval
You can write like
LOAD
Time#(start,'hh:mm:ss TT') as start,Time#(end,'hh:mm:ss TT') as end,
Interval(Time#(end,'hh:mm:ss TT') - Time#(start,'hh:mm:ss TT'),'hh:mm:ss') as Diff;
LOAD * Inline [
start,end
12:55:54 PM,12:59:45 PM ];
Or you can direct use
Interval(Time#(end,'hh:mm:ss TT') - Time#(start,'hh:mm:ss TT'),'hh:mm:ss')
Or
Interval(end - start 'hh:mm:ss')
Regards
Anand