- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Roundup time to nearest upper 15 minutes
Hi,
I have below time format data and want to round up every time to upper nearest 15 minutes.
7:15:30 AM -----------7:30:00 AM
7:01:30 AM -----------7:15:00 AM
7:12:30 AM -----------7:15:00 AM
7:22:30 AM -----------7:30:00 AM
Please Help
Thanks,
Nuwan
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
Time(Ceil( TimeField, 15/24/60 ))
HIC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Henric,
That's the answer.
Moreover i want substract above from this
"time(round(frac(CHECK_OUTTIME), 1/24/4) , 'hh:mm:ss TT')"
I used like the below but some times it gets minus values
time(round(frac(CHECK_OUTTIME), 1/24/4) , 'hh:mm:ss TT') -Time(Ceil( TimeField, 15/24/60 ),'hh:mm:ss TT')
Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to explain what you want to do here...
Do you have a check-in time and a check-out time and want to calculate the difference?
Then
Interval(Ceil(CHECK_OUTTIME), 1/24/4)-Ceil(CHECK_INTIME), 1/24/4), 'hh:mm:ss')
could be an option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the answer.
Moreover need to round down the check out time to lower 15 minutes.
It means
6.14:00PM -------------6.00:00 PM
6.15:45 PM ------------6:15:00 PM
6.29:00 PM------------ 6:15:00 PM
Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Then you should use
Floor(CHECK_OUTTIME, 1/24/4)-Ceil(CHECK_INTIME, 1/24/4)