I am facing an issue with displaying the locale based date format in publishing page out.

I have this code in page layout :

<SharePointWebControls:DateTimeField FieldName="ArticleStartDate" runat="server" DisableInputFieldLabel="true" />

Can anyone please suggest on how to modify the code to display date locale wise.


It could be achieved by setting the "LocaleId" attribute of the DateTimeField.

Also you can disable time display by setting “DateOnly” attribute to True.

<SharePointWebControls:DateTimeField FieldName="4aaf3b75-d54b-4198-b100-bd3aee42224a" LocaleId="1052" DateOnly="true" runat="server" />

LocaleId=“1052” stands for the format which is you want.

Kindly check here for more details

  • I am using i18n folder for all locale, it has to be auto changing with the respective culture information, thus i am not able to use any specific localeid Jun 29 '16 at 11:26
  • I have just taken 1052 for an example, So please find your locale ID from this link...technet.microsoft.com/en-us/library/…
    – Hardik
    Jun 29 '16 at 11:29
  • Did you tried it? Is that working for you?
    – Hardik
    Jun 29 '16 at 12:40
  • I have to make it work for all locale. Like it should not depend on any particular locale. That's the issue. Jun 30 '16 at 6:55
  • Than i think you need to remove LocaleId from the control itself. BTW Glad to help you.
    – Hardik
    Jun 30 '16 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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