Round seconds to minutes
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I wanted to see if it possible to round seconds to minutes. For example:
13:23:39 --> 13:24:00
16:48:11 --> 16:48:00
The threshold is 29 seconds or below will round down to the actual minute and 30 seconds and above will round up to the next minute.
Thanks!
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please check the below discussion on a similar topic.
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Time-Rounding/td-p/37023
The replies to this post contain some solutions that you can possibly use.
Do let me know if this helped.
Best,
Jagdeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's a different method from those in https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Time-Rounding/td-p/37023.
if DateTimeSeconds([TimeStamp])<=29 then
DateTimeTrim([TimeStamp],"minutes")
else
DateTimeTrim(DateTimeAdd([TimeStamp],1,"minutes"),"minutes")
endif
If seconds <= 29 trim the timestamp to the minute, else add one minute and trim the result
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
