Convert Date/Time to GMT

  • Thread starter Thread starter Krish
  • Start date Start date
K

Krish

Are there any functions available in C# which would convert a given date/time
to GMT.


Thanks
 
Krish,

If you have a DateTime instance, you can call the ToUniversalTime method
to convert the DateTime instance to GMT.

Hope this helps.
 
Hi,

In addition to Paldino answer you may like to check
this very good article from this month MSDN magazine, titled "Coding Best
Practices Using DateTime in the .NET Framework"

http://msdn.microsoft.com/netframew.../library/en-us/dndotnet/html/datetimecode.asp

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Nicholas Paldino said:
Krish,

If you have a DateTime instance, you can call the ToUniversalTime method
to convert the DateTime instance to GMT.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Krish said:
Are there any functions available in C# which would convert a given date/time
to GMT.


Thanks
 
Back
Top