Thursday, March 15, 2007

Formating Dates, Times and Currency in Data View Web Parts

If you find that the format of dates, times and currencies are incorrect in your data view web parts, you probably will need to modify the Locale ID being applied in the XSL format statements. For example, the formatdate() XSL method may have the default "English-United States" LCID of 1033.

Note that to change the formatting in other views - for example in a list view - adjust the locale in the Regional Settings page of the Site Settings.

Use the Locale ID (LCID) from the following table to apply regional formatting:

4 comments:

Thanks for the info. Do you know if there's any way to get the current LCID instead of using hard coded ids? For example, if I need to reference something under '/_layouts/[LCID]/images/image.gif'. Thanks