SlideShare a Scribd company logo
How to get the Formatted Data from SharePoint which belong to the regional settingsPhong LeTechnical ManagerBamboo Solutions
Agenda1. SharePoint Regional SettingsSite Regional Settings.
User Regional Settings.2. SharePoint Format ValueFormat value by Site settings.
Format value by user settings.3. Demo4. Q&A
SharePoint Regional Settings1. Site Regional SettingsThese settings affect the current site or site collection.Step by step.
SharePoint Regional Settings (Cont.)2. User Regional SettingsThese settings only affect your own account.users can either use the default regional settings that are set on a specific site or set their own regional settings.Step by step.
Get Format Value From Regional Settings1. Use Function of Object SPFieldUse GetFieldValueAsHtml(value) of object SPField.Format of this function depend on Site Setting.But It is independent on User Setting.
Get Format Value From Regional Settings2. Use Function of Object SPListItemGetFormattedValue(InternalName).Format of this function depend on Site Setting.But It is independent on User Setting.
Get Format Value From Regional Settings3. Use Functions of static SPFieldSPFieldNumber.GetFieldValueAsHtml(valueNumber, new CultureInfo(lcid), spFieldNumber.ShowAsPercentage, spFieldNumber.DisplayFormat);SPFieldDateTime.GetFieldValueAsHtml(valueTime, SPContext.Current.Web, SPDateFormat);
Get Format Value From Regional Settings3. Use Functions of static SPField (cont)Get format value with user settings.SPContext.Current.Web.intlcid= (int)SPContext.Current.RegionalSettings.LocaleId.
Demo

More Related Content

PDF
2024 Trend Updates: What Really Works In SEO & Content Marketing
PPTX
Designing service applications architecture
PPTX
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
PPTX
Branding sharepoint project
ODP
FOSS development collaboration
PPTX
Theory work.
PPTX
Introduction to windows power shell in sharepoint 2010
2024 Trend Updates: What Really Works In SEO & Content Marketing
Designing service applications architecture
Popping the Hood: How to Create Custom SharePoint Branding by Randy Drisgill ...
Branding sharepoint project
FOSS development collaboration
Theory work.
Introduction to windows power shell in sharepoint 2010
Ad

2nd SPS Vietnam - How to get formatted data from SharePoint which belong to the regional settings?

  • 1. How to get the Formatted Data from SharePoint which belong to the regional settingsPhong LeTechnical ManagerBamboo Solutions
  • 2. Agenda1. SharePoint Regional SettingsSite Regional Settings.
  • 3. User Regional Settings.2. SharePoint Format ValueFormat value by Site settings.
  • 4. Format value by user settings.3. Demo4. Q&A
  • 5. SharePoint Regional Settings1. Site Regional SettingsThese settings affect the current site or site collection.Step by step.
  • 6. SharePoint Regional Settings (Cont.)2. User Regional SettingsThese settings only affect your own account.users can either use the default regional settings that are set on a specific site or set their own regional settings.Step by step.
  • 7. Get Format Value From Regional Settings1. Use Function of Object SPFieldUse GetFieldValueAsHtml(value) of object SPField.Format of this function depend on Site Setting.But It is independent on User Setting.
  • 8. Get Format Value From Regional Settings2. Use Function of Object SPListItemGetFormattedValue(InternalName).Format of this function depend on Site Setting.But It is independent on User Setting.
  • 9. Get Format Value From Regional Settings3. Use Functions of static SPFieldSPFieldNumber.GetFieldValueAsHtml(valueNumber, new CultureInfo(lcid), spFieldNumber.ShowAsPercentage, spFieldNumber.DisplayFormat);SPFieldDateTime.GetFieldValueAsHtml(valueTime, SPContext.Current.Web, SPDateFormat);
  • 10. Get Format Value From Regional Settings3. Use Functions of static SPField (cont)Get format value with user settings.SPContext.Current.Web.intlcid= (int)SPContext.Current.RegionalSettings.LocaleId.
  • 11. Demo
  • 12. Q&A

Editor's Notes

  • #2: What => Why => Who => Where => When => How
  • #4: http://<server>/_layout/regionalsetng.aspx