cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hoppo123
Regular Visitor

Enforcing DateTime format

Hi,

I have a Patch that writes the following to my excel workbook...

'Requested On':DateTimeValue(Now(),"en"), 
'Due Back By':DateValue(Now()+20,"en")

I'm in the UK so am looking for dd/mm/yyyy format.

When using the app through my browser, it works fine however when I use through the app on my iphone, the dates get mixed up.

 

The first row below is via my browser. The second row should have the same dates as the first row, but as you can see, they 're different.

hoppo123_1-1643120526002.png

As I can't control the settings on the users' phones, is there something I can do to resolve this?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @hoppo123 

 

I recommend 2 things

  1. Make sure your excel column is date format with (dd/mm/yyyy)
  2. Convert to the desired date format in PowerApps like

 

Text(Now(),"dd/mm/yyyy")

StalinPonnusamy_0-1643151523641.png


Thanks,
Stalin - Learn To Illuminate

View solution in original post

4 REPLIES 4
StalinPonnusamy
Super User
Super User

Hi @hoppo123 

 

I recommend 2 things

  1. Make sure your excel column is date format with (dd/mm/yyyy)
  2. Convert to the desired date format in PowerApps like

 

Text(Now(),"dd/mm/yyyy")

StalinPonnusamy_0-1643151523641.png


Thanks,
Stalin - Learn To Illuminate

Hi, thank you for your reply. I did as you suggest but I get an error, as below. It says Found Type 'Error;  Any ideas why that would be? I've also pasted the excel formatting used.

hoppo123_0-1643197317957.png

hoppo123_1-1643197516283.png

 

Hi @hoppo123 

 

  • Convert to DateValue
DateValue(Text(Now(),"dd/mm/yyyy"))
  • Another option is to keep the Excel as General text instead of date format and use
Text(Now(),"dd/mm/yyyy")

 

Hi, 

Your original solution worked. i.e. setting the excel column format to General and using... 

Text(Now()+20,"dd/mm/yyyy")

 It didn't appear to work originally as I type TEXT rather than Text in the function name, and the error was not particularly helpful. 

Thanks for your help.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,224)