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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,982)