SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to build a calendar with date time columns. My SP 2007 server is in US and I am trying to use this site in India. My server returns the EventDate column value in India format. I want to convert it in US date.

For example:

My Event Date I set is: 5/29/2012 3:00 PM
I want to convert it in: 5/29/2012 2:30 AM (US Time)

Any help will be appreciated.

share|improve this question
up vote 2 down vote accepted

To convert a datetime to an other timezone in c# you can use this:

TimeZoneInfo timeZoneInfo; 

DateTime dateTime ; 

//Set the time zone information to US Mountain Standard Time 

timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("US Mountain Standard Time"); 

//Get date and time in US Mountain Standard Time 

dateTime = TimeZoneInfo.ConvertTime(DateTime.Now, timeZoneInfo);

//Print out the date and time

Console.WriteLine(dateTime.ToString("yyyy-MM-dd HH-mm-ss")); 

A List of TimeZones and further documentation you can find here:

And in the MSDN:

Conversion with XSLT:

share|improve this answer
I am trying to convert timezones in XSLT in SharePoint Designer. – Ashish May 29 '12 at 8:12
I am getting a way I think. However i am unable to use function adjust-dateTime-to-timezone(). It gives me error: adjust-dateTime-to-timezone is not a valid XSLT or XPath function. Am I missing a xmlnamespace? An example would be helpful. Thanks. – Ashish May 29 '12 at 9:36
@Ashish I think it is is a XPath 2.0 function, looks as if you called it from a 1.0 processor. – MOI May 29 '12 at 10:22
I changed the version of my xsl:stylesheet declaration to version="2.0". How can i check if I can process 2.0 functions as well? – Ashish May 29 '12 at 10:24
@Ashish try one of these functions: – MOI May 29 '12 at 10:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.