web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Subtracting Minutes Fr...
Power Apps
Answered

Subtracting Minutes From a Time Input

(1) ShareShare
ReportReport
Posted on by 4
I am building application where the user can select a time at one point in the application, then later on, they are allowed to add or subtract minutes from the previously selected time. 
 
When it comes to adding minutes, everything works fine, but I am having trouble subtracting minutes from a time (example: 04:00- 2 minutes = 03:58) especially times that would change the hour back. 
 
Any help would be appreciated. 
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,362 Super User 2025 Season 2 on at
    Hi,
     
    You simply use the DateAdd function with a negative number and set the increments to minutes like this
     
    DateAdd(UtcNow(), -2, TimeUnit.Minutes)
     
    And done, just make sure that your first parameter is an actual DateTime, not a String. If its a string then use DateTimeValue
     
    DateAdd(DateTimeValue("12/12/2024 12:00"), -2, TimeUnit.Minutes)
     

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard