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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get Selected Date/Time...
Power Apps
Answered

Get Selected Date/Time from Form Field

(0) ShareShare
ReportReport
Posted on by 10

I am looking to get the currently selected Date and Time in a Date/Time field in a form (to compare it with the current time).

 

I can get the time from the record that's saved (if in edit mode), but I want it to update real time. How can I do this given that the date, hour, and minute fields are 3 separate dropdowns within the Date/Time field?

 

Thank you!

Categories:
  • elseb Profile Picture
    774 Moderator on at

    If you want RTC to use in your app, add a timer control set:

     

    Duration: 1000

    Repeat: on

    Auto start: on

     

    OnTimerEnd:

    Set(varNowHh,Left(Text(Now(),"hh:mm"),2));
    Set(varNowMm,Right(Text(Now(),"hh:mm"),2));
     
    then in your hour dropdown default put: varNowHh
    and minute dropdown default: varNowMm
  • tjohnson2 Profile Picture
    10 on at

    I'm not sure that's what I am looking for. Essentially, I just want to be able to pull the time selected from the Date/Time field that's selected in the form. I seem to only be able to get the value from the field which appears after it's saved.

     

    How can I take the date, hour dropdown, and minute dropdown to convert it to the UTC time?

  • Verified answer
    elseb Profile Picture
    774 Moderator on at

    try this:

     

     

    DTEdate.SelectedDate+Time(DPDhh.Selected.Value,DPDmm.Selected.Value,00)

     

     

    in this example I've used:

    date picker name: DTEdate

    hour dropdown name: DPDhh

    minute dropdown name: DPDmm

     

    result below:

    elseb_0-1716479568031.png

    PS. the label displays the result of the code.

     

  • tjohnson2 Profile Picture
    10 on at

    That worked perfectly - thank you!

  • elseb Profile Picture
    774 Moderator on at

    you're welcome!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard