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

To Move items from one ListBox to another Listbox

Receive Json Web response in C#