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 / How to determine the t...
Power Apps
Unanswered

How to determine the time difference between a saved date and now?

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I've managed to get my clock working but now I'm trying to calculate the time difference between a saved date:time in a table and now.

 

I have a Table in a Data source titled "EWDData2" with a column titled "Time".

 

i also have the current time updating in my textbox titled "textbox1".

 

I'd like to ideally get the difference to show in the text format hh:mm:ss

 

Here's what I have so far but its not working, hoping you can help.

 

DateDiff(Last(EWDData2).Time,textbox1,Seconds)

 

Thanks in advance for any help you can provide

 

 

Dave

Categories:
I have the same question (0)
  • Meneghino Profile Picture
    6,949 on at

    PowerApps is a mess, as it allows you occasionally to refer to a label (a.k.a. text box) just by the name of the object.  This will sometimes work, sometimes not.  In your case it seems not to.

    The only sure way to refer to the contents of textbox1 is textbox1.Text, which is by definition a text type value and not datetime.  Hence the safest way to refer to the time value displayed by textbox1 is to convert from text to datetime.

    Hence:

    DateTimeValue(textbox1.Text)

    (You may need the second parameter of language if you have locale issues)

    Hence the full formula should be:

    DateDiff(Last(EWDData2).Time, DateTimeValue(textbox1.Text), Seconds)

    Please let me know if this works.

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard