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 / Date formatting adding...
Power Apps
Answered

Date formatting adding time

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a form that a user will fill out and select a date where they believe the job will be completed. This is done through a Date Picker in a form. The data from the form is than written to an excel document on stored in OneDrive. The date rights to the excel document perfectly except for the fact of it adds a time to the end of the date which I don't want and throws off some of my if checks I use later. I have the Date picker format set to DateTimeFormat.ShortDate which I believe shouldn't include the time. What am I missing here? Any help is appreciated.

Categories:
I have the same question (0)
  • Verified answer
    RusselThomas Profile Picture
    4,014 on at

    Hi zblankenship,

     

    Maybe check the Update property of the card housing the datepicker in the form - usually PowerApps detects the date format from the source and puts the datepicker constructs into the form for you - but these tend to include minutes and seconds, which you don't need.  It then constructs a datetime format from all three dropdowns used to collect date and time and then saves that back to the source - it usually looks something like this;

     

    DataCard Update Property (on the card, not the dropdown itself):

     

    DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)

    The dateformat of the date dropdown can be shortdate, but it's the formula above that gets applied and saved along with the minutes and seconds, even if they're zero.

     

    If this is the case, you should be able to just remove the minutes and seconds from the update formula, leaving the Update property as;

    DateValue1.SelectedDate

     

    Hope this helps,

     

    RT

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    Could you please share a screenshot of the Edit form within your app?

    How do you save your form data to your Excel file stored in your OneDrive? Using SubmitForm function or Patch function?

     

    I agree with @RusselThomas's thought almost, please check if there is a HourValue Drop down control and MinuteValue Drop down control within the Data Card control which is associated with the Date picker control.

     

    The Data Card control associated with Date picker control, HourValue Drop down control and MinuteValue Drop down control as below:9.JPG

     

     

    Please take a try with the following workaround to fix your issue:

    1. Unlock the Data card control which is associated with the Date picker control.
    2. Set Update property of the Data card control to following formula:
    DateValue1.SelectedDate

    Note: The previous value within the Update property of the Data card control as below:

    DateValue1.SelectedDate + Time(Value(HourValue1.Selected.Value), Value(MinuteValue1.Selected.Value), 0)

     

    Best regards,

    Kris

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I couldn't figure it out because the field that was generating the problem is invisible and I was doing all the fixing on a field that was visible. Thanks for your help.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard