Tuesday, July 7, 2009

The LCID and ddwrt:FormatDate method

With the following example you can customize the date strings output in dataviews by setting the LCID and FormatFlag parameters in the ddwrt:FormatDate(szDate, lcid, FormatFlag) method.

ddwrt:FormatDate(string(@PublishDate), 1033, 5) => MM/DD/YYYY
ddwrt:FormatDate(string(@PublishDate), 1033, 1) => MM/DD/YYYY HH:MM AM/PM

1033 is the English LCID, for persian you may use 1065.
For more LCIDs click here.

No comments:

Post a Comment