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 / Button that adds curre...
Power Apps
Answered

Button that adds current time to a textbox

(0) ShareShare
ReportReport
Posted on by 160

 

Hi All,

 

I am looking to add a button that will add the current time and date to a textbox, but cant seem to see the correct forumla,

 

I have Text( Now(), "[$-en-GB]hh:mm:ss" ) to see the current time, but would like a button that will add that to a text box on my form.

 

Does anyone have any ideas?

 

Thank you

 

Gaz

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    On the Textbox,

    1. Set the Default to Now()

    2. On the format of same textbox put your formula there

    Check the attachement

     

    If it answered it Mark as  a Solution, if it helped, give Thumps up

     
    Format.JPG
    Now.JPG
  • Gazbeer Profile Picture
    160 on at

    Thanks for your reply,

     

    I need the text box empty until a button is clicked that saves the current time and date into the text box, 

     

    bit of a weird one, just that I have multiple text boxes that times will have to be entered at the current time depending when they press the button,

     

    ie.

     

    Check 1 [ time ]   with a button {Save}  that will add the current time to the text box

    Check 2 [ time ]   with a button {Save}   and so on

     

  • Gazbeer Profile Picture
    160 on at

    Think i've sorted it...

     

    Button:   OnSelect - Set(test1, Text( Now(), "[$-en-GB]hh:mm:ss"))

     

    Textbox:  Default -    test1

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    on the Onselect of the Button Put:
    1. Set (varTimeNow,Now())

    2. In the Default of the TextBox put the variable: varTimeNow

     

    3. I have tried it, it working

  • Gazbeer Profile Picture
    160 on at

    Thank you

  • PASINDA Profile Picture
    6 on at

    Thank you Gazbeer , It was helpful 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard