Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone ,
I have requirements I need get interval between current date and previous date by hour
for example 1/30/2016 10:30:23 am
1/30/2016 12:30:30 pm
my output is 2 hours
Please help me out
Try this:
Interval(CurrentDate - PreviousDate, 'hh')
For you example:
=Interval(Timestamp#('1/30/2016 12:30:30 PM', 'M/D/YYYY h:mm:ss TT') - Timestamp#('1/30/2016 10:30:23 AM', 'M/D/YYYY h:mm:ss TT'), 'h')
Both are same Field
Example
1/30/2016 10:30:23 am - 0 hh(ouput)
1/30/2016 12:30:30 pm- 2 hh(output)
1/30/2016 15:30:30 pm - 3 hh(output)
Like wise
Where are you trying to do this? Script or chart?
Script
You can use Peek() or Previous() ?
Interval(DateTime - Previous(DateTime), 'hh')
Not working in my Case
Would you please help on Chart
Would you be able to provide few rows of data of how your data looks like?