1

i want to change the format of Field "Modified"

<SharePointWebControls:DateTimeField Name="Modified">

on my layout to this format : 1 january 2014 instead of 01/01/2014 00:00 is it possible?

Thanks for your help

0

There are multiple ways to achieve this

  1. Create a new Class that inherits DateTimeField and add a property which displays the new format. Detailed steps
  2. Using Inline code in place of the control

    <%=SPContext.Current.ListItem["Modified"] != null? (new DateTime(SPContext.Current.ListItem["Modified"].toString()).ToString("dd/mm/yyyy hh:MM"): string.Empty %>
    

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.