Yes.
>I think code takes care about midnigh already.
>
>>That's similar to the idea I had in mind. But don't forget about midnigt. Also the requirement changed and I want the nearest 15 minutes rather than an hour.
>>
>>>Not tested
ltDt = DATETIME()
>>>? DATETIME(YEAR(ltDt), MONTH(ltDt), DAY(ltDt), HOUR(ltDt), 0, 0) + ;
>>> IIF(MINUTE(ltDT)*60 + SEC(ltDT) >= 30*60, 1*60*60, 0)
>>>
>>>>
>>>>How can I convert datetime() to the nearest hour?
>>>>
If it's not broken, fix it until it is.
My Blog