SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a date & time type of column in my custom list, I have selected date only as display format. I can just fill date in this field on new item form but when i see this field in display item form, i see some extra charaters with the date selected, I just want to display date on display form as well. Please help. Thanks a lot.

share|improve this question
What kind of extra characters do you see? Can you add a screenshot? – Dribbel Jun 15 '12 at 12:20
"2012-06-01T05:00:00Z" I get this value when i select 1/June/2012. I only get this value on the display form that I've customized, not on the display form created by SharePoint. – NotesArt Jun 15 '12 at 13:13
That is the ISO format and can be changed. What method did you use to add this to the display form? IE what code are you using? – spevilgenius Jun 15 '12 at 13:22
up vote 3 down vote accepted

Use something like:

<xsl:value-of select="ddwrt:FormatDate(@ArticleStartDate, 1033, 3)"/>  

Change 1033 to you LocalID and the second number is a format specifier. See here for possible values.

Make sure you have the ddwrt namespace reference xmlns:ddwrt="" in the top of your xsl.

See also: this SO-question and this blog

share|improve this answer
i used this,worked well <xsl:value-of select="ddwrt:FormatDate(@ArticleStartDate, 1033, 1)"/> – NotesArt Jun 16 '12 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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