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 picker language =...
Power Apps
Unanswered

Date picker language = User's phone language

(0) ShareShare
ReportReport
Posted on by 58

Hello guys,

 

[CONTEXT]

  • "Leave Request" app
  • Users can create a leave request by selecting a start date and an end date in Date Pickers.
  • Date picker controls have these parameters: 
    • Format: "[$-fr-FR]dd/mm/yyyy"
    • Language: "fr-FR"
    • DateTimeZone: DateTimeZone.Local
  • Once the request is completed, an email is sent to HR with the dates selected. To do so, I wrote some lines in HTML with placeholders (i.e.: "{LeaveStart}") that are replaced by the selected dates of the user:
    • ClearCollect(HTMLTemplate, {Field: "{LeaveStart}", Data: Text(LeaveStartDatePicker.SelectedDate,"[$-fr-FR]mmm. dd, yyyy")})

[ISSUE]

In the email, the date is not entered in French (as specified by the format of the DatePickers) but in the language of the user's phone (for instance, if the language of the user's phone is Italian, the month will appear in Italian in the mail).

 

[DESIRED OUTPUT]

I'd like that, in the email that is sent to HR, the language stays in French. How can I do so?

 

If you have any additional questions, don't hesitate to let me know. I'll do my best to provide you with as most information as possible.

 

Regards,

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is odd, as I imagine your ClearCollect() function saves the date as a string, not as a date. What does the Send Mail code look like? Any possibility of reformatting there?

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @alexlrca ,

    Do you mean that your location in powerapps is french, if you send email with the data of datepicker, the email's content will change with the receiver's phone language?

    Could you tell me 

    1)what does the receiver's phone language mean? Do you mean the location in someone's office365 profile ?

    2)the the email's content will change with the receiver's phone language or the sender's phone language?

    3)the formula that you use to send email?

    I've made a similar test but not met the same problem like your description.

    Here's the test for your reference:

    1)the datepicker's setting:

    • Format: "[$-fr-FR]dd/mm/yyyy"
    • Language: "fr-FR"
    • DateTimeZone: DateTimeZone.UTC

    2)the send emial formula:

    Office365Outlook.SendEmailV2("phoebel@.....com","test",Text(DatePicker1.SelectedDate))

    3)the location in the receiver's profile is Singapore

    4)the received email content:

    the data same as in datepicker

    it not transfer with the  receiver's profile's location.

    20201101.PNG

     

    20201102.PNG

     

     

     

    Best regards,

  • alexlrca Profile Picture
    58 on at

    Hi @Anonymous ,

     

    Thanks for your answer! 

    The SendMail code is a bit messy, since there are many different conditions depending on the user's profile.

    But here's how the content of the mail is coded (pretty simple): 

    • LookUp(HTMLTemplate,Row = 1).Value

    It simply looks up the data in the HTML Template Collection after the placeholders were replaced with the Leave Request data of the user. That step is done like this:

    ForAll(HTMLTemplate, Patch(EmailData,LookUp(HTMLTemplate,If(_managerView,Row = 2,Row = 1)),{Value: Substitute(LookUp(
    EmailData,If(_managerView,Row = 2,Row = 1)).Value,Field,Data)}));

     

    I actually reached a solution yesterday by changing the format of the date in the email. Instead of showing the first three letters of the month followed by the day (i.e.: Jan. 16), it shows only numbers (01/16/2020).  But still, if formatting is important for other people, this could be a problem. 

     

    Regards,

     

  • alexlrca Profile Picture
    58 on at

    Hi @v-yutliu-msft ,

     

    Thanks a lot for your help!

     

    Here are my answers to your questions:

     

    1) What does the receiver's phone language mean? Do you mean the location in someone's office365 profile ?

    No, I don't mean the location in someone's office365 profile. I mean the selected language in the settings of the smartphone of the user. For instance, if the smartphone of my user is in Turkish, PowerApps will be in Turkish, and the format of the date that is sent by mail will also be in Turkish (instead of seeing "Janvier", I'd see "Ocak"). Please note that the issue is not about the receiver's phone language, but about the sender's phone language.

    2) The the email's content will change with the receiver's phone language or the sender's phone language?
    The language in which the dates are formatted in the email is changing depending on the SENDER's phone language.

    The receiver's phone language doesn't impact the process.

     

    3) The SendMail code is a bit messy, since there are many different conditions depending on the user's profile.

    But here's how the content of the mail is coded (pretty simple): 

    • LookUp(HTMLTemplate,Row = 1).Value

    It simply looks up the data in the HTML Template Collection after the placeholders were replaced with the Leave Request data of the user. That step is done like this:

    ForAll(HTMLTemplate, Patch(EmailData,LookUp(HTMLTemplate,If(_managerView,Row = 2,Row = 1)),{Value: Substitute(LookUp(
    EmailData,If(_managerView,Row = 2,Row = 1)).Value,Field,Data)}));

     

    4) Regarding the test you made: please note that the date format that I used is not the same: "[$-fr-FR]mmm. dd, yyyy" is the one I used (the month isn't displayed with numbers, but with the first three letters (i.e.: "Jan" for "January" and not "1"). This is how the problem can be noticed. When using numbers, the problem cannot be seen.

     

     

    I actually reached a temporary solution yesterday by changing the format of the date in the email and only using numbers, as you did in your test. Instead of showing the first three letters of the month followed by the day (i.e.: Jan. 16), it shows only numbers (01/16/2020).  But still, if date formatting is important for other people and they must show the month in letters, this could be a problem. 

     

    Regards,

     

     

     

     

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard