0

I'm currently developing a SP Project using Visual Studio. Apparently the default date format for Sharepoint:DateTimeControl is 'yyyy/mm/dd', by using LocaleId="2057", I can change it to 'dd/MM/yyyy' which is fine.

Is there any way to change the date format to 'dd-MM-yyyy' without any script?

Maybe I'm missing out on another LocaleId, I have tried LocaleId="1033", the format is ok, but the calendar is not English.

Please help. Thanks in advance.

2 Answers 2

0

Dates in SharePoint are stored in UTC, which is most likely why it's returned in that format when you're fetching the date programmatically. SharePoint sites have regional settings where you can define the appropriate locale, e.g. English - United Kingdom (2057). Once you have set the appropriate regional settings for the site, dates in the user interface will be shown in the appropriate format for that region. Below is a list of LCIDs for various regions worldwide:

2.1.1906 Part 4 Section 7.6.2.39, LCID (Locale ID)

0

Per my research, you can set Regional in site setting. By default, SharePoint Online sites display the dates in US format (MM/DD/YYYY). You may want to change the date format based on the country you live in.

Click on Settings gear >> Click on Site settings On the Site settings page, Under Site Administration, click on the “Regional settings” link.

enter image description here

1
  • I am checking to see if the problem has been resolved. Commented Jul 5, 2022 at 2:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.