latest Post

SharePoint How to change date Format on a site or list?



SharePoint How to change date Format on a site or list?


Introduction: In this blog, you will learn how to change date Format for a single list column or change Format for the whole subsite. These same steps supporting on-premise versions and SharePoint online - Office 365 sites.

Steps Involved: Please follow steps below to update date format



1.     Change Date Format for a particular site or subsite.

We would like to change date and time format from the USA to the UK for all list and library etc. Please find below screenshot just for your reference and compare.


To achieve this we have made changes in site Regional settings using below steps and this change will update date and time everywhere in your site list and library etc.
a.     Go to "Site settings"
b.     Under the "Site Administration" Section click on "Regional settings".
c.      In "Locale" choice select desired option; example format DD/MM/YYYY you need to select "English (United Kingdom)" and Click OK button.

          



2.     Change Date Format for particular list column.
a.     Go to Your List where you would like to see Formatted date and Time
b.     I have list name Event List and have a column called Event Date in my list, currently its displaying SharePoint Default date and time format based upon current regional setting.
c.      Now we would like to display a date in the different date and time format as shown in below picture, we have added three new column to display different date and time format.
d.     To achieve this we need to add a calculated column and use sample code below. Also please feel free to add the pattern as per your desired output.


Column Name
Calculated Column Formula Value
      Event_Date_Formated_dd mmm yy 
=TEXT(EventDate,"dd mmm yy")
Event_Date_Formate_MMM-DD-YYYY
=TEXT(EventDate,"mmm-dd-yyyy")
      Event_Time_Formated_HH-MM
=TEXT(EventDate,"HH-MM")

        
Note: This kind of Date and time format we can only achieve via only calculated column not changes regional setting of site.

Summary

Thus, We have learned here now
how to change date Format for a single list column or change Format for whole sub site on on-Premise SharePoint versions sites.

About Yogendra Bhardwaj

Yogendra Bhardwaj
Yogendra has been in the IT services industry for almost 10 years and Microsoft certified Professional. He specialized in Service and Delivery management, Design and development of Microsoft technology based systems including Collaboration, also having experience of Automation and integration of different platform. He has got extensive experience with Microsoft technology stake for Office 365, SharePoint 2010/2013, and .net , C#. Also having hands on knowledge on Telerik Sitefinity, site core, Visual studio Test Manager, He has extensive experience for App Dev and App Support projects with supporting end to end SDLC process for Support and Maintenance projects.
Recommended Posts × +

1 comments:

Sumanta said...

I was going for the DD/MMM/YY format. Working correctly, but for the blank fields it is showing like 30/Dec/99. How not to calculate for the blank fields?

Comment