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 / date time now in a dat...
Power Apps
Answered

date time now in a date and time field and then reset field to blank

(3) ShareShare
ReportReport
Posted on by 24
Hi Experts,
 
Hopefully an easy one for you. I have an app where I want to click a button and it enters the date and time now into a date and time field within a form. Once the form has successfully uploaded to sharepoint, reset the date and time field within the form back to blank. 
 
Thanks in advance
 
Dave
Categories:
I have the same question (0)
  • Kalel_Lucas Profile Picture
    165 on at
    Hello Dave-ITMan,
     
    If that Date Picker control has its DefaultDate property set as empty, you can put Reset(DatePicker1) on your Form's OnSuccess property.
    This should clear your control to its original blank state.
     
    Hope it helps,
    Kalel
  • DAsuzu Profile Picture
    4 on at
    Hi Dave,
     
    You would have to show your setup to get exact details but you might need a variable so that a click of the button sets the variable and then your item property will have an if statement that uses Today() as the value to submit then do what Kalel suggested with the reset. My best guess based on assumptions that may be wrong until you share more details like a screenshot.
     
    Cheers,
    Dan.
  • Dave-ITMan Profile Picture
    24 on at
    Hi both,
     
    Thank you for the replies, i've tried that but doesn't seem to work. please see the screenshot below which will hopefully explain it a bit better than I did originally. I just need to reset the Sign In or Sign Out date and time (depending on which button was pressed) when the form has successfully been uploaded to sharepoint. 
     
     
     
    Thanks in advance
     
    Dave
  • Verified answer
    Kalel_Lucas Profile Picture
    165 on at
    Hello Dave,
     
    Right, I had forgotten that your controls were inside a DataCard; Reset won't work on them.
    Since you're using variables to set the Default property of the DataCard, you can instead try the following code on the OnSuccess property of the form:
    Set(currentTimeSignIn, Blank()),
    Set(currentTimeSignOut, Blank()),
    ResetForm(Form1_1)
    Please, try that and tell me if it works as intended.
     
    Kind regards,
    Kalel
  • Dave-ITMan Profile Picture
    24 on at
    Hi @Kalel,
     
    Works perfectly, thank you so much for your help - much appreciated.

    Regards
     
    Dave

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

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard