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 / how to fix Format dates
Power Apps
Unanswered

how to fix Format dates

(0) ShareShare
ReportReport
Posted on by 62

Picture1.pngPicture2.png

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @suthichaia

    By using the TEXT function you can control how a date is shown.  You do not need to change your Thai language.

    Use this in the Text property of a label for today's date.

     

    Text(Now(), "m/d/yyyy")

     

    Or if you specifically want 2020-22-07

     

    Text(Date(2020, 22, 7), "m/d/yyyy")

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@suthichaia,

    Based on the issue that you mentioned, do you want to format the date when the language is set to Thai?

    In general, when setting language to en-US, the date will be formatted as mm/dd/yyyy. 

    @mdevaney has posted the correct Text(), you can have a try. To add to @mdevaney, please modify your formula as below.

    You can keep your Thai language and set the Text property of the Label as below.

     

    Text(Now(),"[$-en-US]m/dd/yyyy")

     

    Best Regards,

    Qi 

  • suthichaia Profile Picture
    62 on at

    DateDif Error??

    Picture11.pngPicture22.png

  • suthichaia Profile Picture
    62 on at

    date diff error, how to fix?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@suthichaia,

    It seems that when you choose "Thai" as your default language, it went wrong when you calculate with DateDiff() function.

    If this has no effect on your subsequent work, you can choose en-US as your default language.

    If you insist on "Thai" as your default language, you can take a try as below.

    1/Add two DatePickers (one for StartDate and another for EndDate) and you can select any date you want within.

    Note: You can set the DefaultDate property of the StartDate as Today(), and you can select any date you want within the second DatePicker.

    2/Add a Label to display the calculation and set the Text property as below.

     

    DateDiff(DatePicker1.SelectedDate,DatePicker2.SelectedDate,Days)

     

    Note: If you want to calculate the days difference, you should add parameters in DateDiff().

    Here is the Gif you can check as below.

    0727Gif1.gif

    Best Regards,

    Qi

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard