Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following function in my code which rounds the datetime field that I read to the nearest quarter:
TimeStamp(Round(interval, (1/(24*4))), 'D/M/YY HH:mm') As UsageEnd,
so 11:44:01 AM become 11:45 etc..
I want to create another field ("QuarterStart") that will store a value that is 15 minutes EARLIER than the calculated value above.
Any ideas?
Thanx in advance
Alexis
Use the floor function to round down to the quarter and use the ceil function to round up to the quarter.
timestamp(floor(interval, 1/96),'D/M/YY HH:mm')
timestamp(ceil(interval, 1/96),'D/M/YY HH:mm')
Use the floor function to round down to the quarter and use the ceil function to round up to the quarter.
timestamp(floor(interval, 1/96),'D/M/YY HH:mm')
timestamp(ceil(interval, 1/96),'D/M/YY HH:mm')
Thank you Gysbert - that answers my question perfectly.
Alexis