To Convert DateTime format in EST

The Following Function is used to convert datetime of your webserver into EST.

Code:-

protected DateTime getESTFormatedDatetime(DateTime dtdate)
{
return TimeZone.CurrentTimeZone.ToUniversalTime(dtdate).AddHours(-5);
}

Desc:-
The function takes an argument of datetime format and return also the datetime format.

Comments

Anonymous said…
nice one:)
-sheetal

Popular posts from this blog

Export To Excel Even With Special Character in Data

Get Plain Text from FCKEditor in any Browser.