FIX: Setting the sharepoint regional settings and saving date values
Jan 9, 2009

Generally we are saving the date values by “DateTime.Now.ToString()” for the SharePoint list item fields. This works fine if our regional setting’s locale for the site is “English (United State)”. But if we change the locale to “English (United Kingdom)” and try to save the date by using the above method then it will throw the exception. To fix this just use “yyyy-MM-ddTHH:mm:ssZ” as the parameter to the “.ToString()” method for the datetime. So for example use DateTime.Now.ToString(“yyyy-MM-ddTHH:mm:ssZ”). This will save the value without any exception.

Leave a Reply

Your email address will not be published. Required fields are marked *


Related Posts

SharePoint site first load is very slow

The sharepoint site is very slow when we access it first time. After…

May 30, 2011

Designer workflow failed on start when item is added

I recently got stuck with one of the strange trouble with a developer….

Jun 16, 2010

“Cannot complete this action” error while saving site as template

Today while trying to save a site as template (through “Site Settings” >…

May 18, 2012

Copyright © Prakash Software Solutions Pvt. Ltd. All Rights Reserved.