Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Date Time weirdness

Posted on by

I've got a PowerApp I'm building in the UK with UK date time formats. I've added a date time picker on the form for a text field, and the date picker displays in uk format (mm/dd/yyyy). On an new item, when it saves back to the text field in SP it does it in UK format. All good

 

However, If I reopen the form in edit mode for an existing item, the date selected by the date field is completely wrong. For example 13/05/2021 stored in the text field results in the date picker defaulting to 05/01/2022

robinisathakur_0-1620779484119.png

 

I've set the format of the Date Picker to be dd/mm/yyyy

 

robinisathakur_0-1620779791279.png

 

  • Re: Date Time weirdness

    Thanks, it was simpler than I was trying to do it, and you saved my bacon! 

  • Verified answer
    Re: Date Time weirdness

    Hi @robinisathakur :

    please set the data card's Update property to

    Text(DatePicker.SelectedDate,"dd/mm/yyyy")

    and then set the data picker's DefaultDate property to :

    DateValue(Parent.Default,"en-GB")

     Best Regards,

     Bof

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard