cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Resolver II
Resolver II

Date Today() correct in editor mode but wrong (including year) in browser/live mode

My app has a date column which automatically populated today's date when a new form is completed. A user can then come to review their old form and update it if necessary. If they update the form, the date should amend to the 'new' current date (eg. the date they resubmit the updated form). This works perfectly in the editor but for some reason is calculating the date as 2022?

 

Screenshots to show below:

 

In editor:

When in View mode:

error 1.png

when the user hits the 'Edit form button':

error 2.png

 

In browser/live:

In 'View' mode:

error 3.png

 

When the user his the 'Edit form' button:

 

error 4.png

 

 

I have no idea what could be causing the year to change like that.

 

I have also just noticed that for some reason in browser it is also still showing the view date as the US format rather than UK and I am not sure how I can fix that either.

 

They are definitely the same version (I did however change the title from 'Date' to 'Date completed/edited' so that is why they look slightly different

 

Any help is appreciated!

3 REPLIES 3
mahoneypat
Solution Sage
Solution Sage

This is likely due to the default language selection in the browser.  See this post for more info.

Solved: DateTime picker displays incorrect format for our ... - Power Platform Community (microsoft....

 

You can try this expression to fix it.

Text(Today(), "[$-en-US]dd/MM/yyyy")

 

Regards,

Pat

I am already using that expression in the formula: Text(Today(), "[&-en-GB]dd/mm/yyyy"), and although that would make the most sense from everything I've read there are a few differences 

 

Both this formatting error AND the error where it gives the entirely wrong date (04/03/2022, as above) only happens when the app is embedded into a sharepoint page.

 

If I just open the live app link in the same browser then it all works as intended. I'd imagine if it was a browser issue (which is already set to UK from all I can tell), then I would expect it to be broken on both considering they're both opened in the exact same Chrome?

 

 

v-bofeng-msft
Community Support
Community Support

Hi @misc :

please set the date picker control's Format property to:

"dd/mm/yyy"

Best Regards,

Bof

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (37,599)