Notifications
Announcements
How would I round down the current time in UTC format to the nearest hour or 30 minute interval?
E.g:
Time now = 02/14/2020, 14:28
So I want to set a variable to = 02/14/2020, 14:00 (rounding down to the nearest hour or 30 minute interval)
@PGTips
Please try this code:
Set(myDateVariable, Today() + Time(Hour(Now(),RoundDown(Minute(Now())/30,0),0) )
---Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
DateAdd( Now(), (Minute(Now()) * - 1) + If( Minute(Now()) >= 30, 30, 0 ), Minutes )
The previous response works as well. Thanks @mdevaney
EDIT: Corrected mine to account for the 30 minute interval requirement.
Amazing, thanks! And then finally, how would I convert to this format: "2020-02-14T09:00:00"
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268