Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am having article date field in page layout.
I want change the format of this field to dd/mm/yyyy.

<SharePointWebControls:DateTimeField FieldName="ArticleStartDate"  runat="server" id="datetimefield"></SharePointWebControls:DateTimeField>

I also tried with LocaleId="1036" DateOnly="true" but it is not working


Please suggest,
Thanks
Posted
Comments
Maciej Los 27-Jul-15 7:11am    
http://www.sharepointusecases.com/2009/01/customizing-datetime-format-on-a-list-view-web-part/

One way is to derive your own class from DateTimeField and implement the format in it. Have a look at Render Custom Date Format in display mode of DateTime Field in Page Layouts[^]
 
Share this answer
 
Comments
Rashmi Sutar 27-Jul-15 7:11am    
thanks Mika,

But I don't have access to solution to create new class.
Is their any other way using js or jquery?
I tried some but no sucess:(
Please, read my comment to the question.

For further information, please see:
Working with Date Formats in SharePoint 2010[^]
SharePoint Calculated Columns [^]
 
Share this answer
 
v2
Comments
Rashmi Sutar 27-Jul-15 7:25am    
I tried and in Regional setting it mentioned France as this site is for France users.
but when I am trying to create calculated column its giving me error that
"Server error in / application"

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900