Date Format Issue in SharePoint Designer

Dear All,

I have a List View with a Date field and I want to format it.

I have used SharePoint designer XSLT format instead to SharePoint List calculated Field, because, Sorting is not working with Calculated Fields with the format. Thats the reason I used SharePoint Designer.

So, As per attached, I have used the below formula in Tag Property.

ddwrt:FormatDateTime(string($thisNode/@*[name()=current()/@Name]) ,1033 ,'dd-MMM-yy')

But formatting is not working properly. Is there any issue with my approach?

If you in my attached( List with Data), green lines are proper but not red lines. When the month and data both below 12, then formatting is wrong. Could you please advise the error here?

May 18th, 2015 12:37pm

Hi,

Do not use string($thisNode/@*[name()=current()/@Name]  in here, try string($thisNode/@DateFormatVal).

For more information, please have a look at the blog:

https://msdn.microsoft.com/en-us/library/office/ff606773%28v=office.14%29.aspx

https://social.msdn.microsoft.com/Forums/office/en-US/41699c1e-a5eb-43da-b424-be70ed50a251/xsl-check-for-expired-time?forum=sharepointcustomization

Best Regards,

Eric

Free Windows Admin Tool Kit Click here and download it now
May 20th, 2015 11:09am

Thanks Eric,

I tried that, but didn't work that as well.

May 21st, 2015 3:19am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics