cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
elaaadani
Helper IV
Helper IV

Take current time and time 5 minutes ago

Hi everyone !  I would like to know if there is a way to take the current time and the time 5 minutes ago. That is to say, currently it is 15:10 I keep in a variable, and I want to take also 15:05 and leave in a variable.
I am making a query in SQL Oracle that does not allow me to get the 5 minutes before using this statement.


TO_DATE(FV.FEC_LOAD, 'MM/DD/YYYY HH24:MI:SS') >= SYSDATE - 5/(24*60)


If I put a condition where I put current time and time 5 minutes later, manually, it works perfect.

Is there  way to do this? thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

addHours(addMinutes(utcNow(),-5), -4)  - minus 4 hours and 5 minutes
addHours(utcnow(), -4) - minus 4 hours only

View solution in original post

3 REPLIES 3
Paulie78
Super User
Super User

Use the expression:

addMinutes(utcNow(), -5)

You may need to wrap this in a formatDateTime expression to get the format you need. Let me know if you need extra assistance.

@Paulie78 

Thank you very much ! I just need to know how I can transform the uctcnow  to my local time. I use UTC-4

Paulie78
Super User
Super User

addHours(addMinutes(utcNow(),-5), -4)  - minus 4 hours and 5 minutes
addHours(utcnow(), -4) - minus 4 hours only

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,380)