Code Tip – SharePoint DateTime control date format

Code Tip – SharePoint DateTime control date format
5 votes, 4.60 avg. rating (91% score)

Tip – Modify Date format of SharePoint DateTimeControl

The default selected date format of SharePoint DateTimeControl is ‘mm/dd/yyyy’. Changing selected date format to ‘dd/mm/yyyy’ can be done by LocaleId property

<SharePoint:DateTimeControl CssClassTextBox="MyCustomDateTimeClass" LocaleId="2057" ID="dtStartDate" runat="server" />

This will display the selected date in ‘dd/mm/yyyy’ format.

Here is the complete list of LocaleId’s
http://msdn.microsoft.com/en-us/goglobal/bb895996.aspx

December 11, 2012 В· Adi В· No Comments
Tags:  В· Posted in: Sharepoint 2010, Tips and Tricks

Leave a Reply

What is 6 + 3 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)