Re: datetime conversions - US CST
From: Jay B. Harlow [MVP - Outlook] (Jay_Harlow_MVP_at_msn.com)
Date: 08/25/04
- Next message: Terry Olsen: "Is there a better way to "Wait"?"
- Previous message: Hal Rosser: "Re: Rows out of order !"
- In reply to: Mark: "datetime conversions - US CST"
- Next in thread: Mark: "Re: datetime conversions - US CST"
- Reply: Mark: "Re: datetime conversions - US CST"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 24 Aug 2004 22:40:43 -0500
Mark,
Unfortunately System.DateTime (VB's Date) only knows how to convert a
Universal Time to Local Time & convert Local Time to UniversalTime.
I would recommend that each of your machines convert local time to universal
time, then send that time to the server. The server can then convert the
universal time to local time which will be CST.
You can use
- DateTime.Now - to get current local date & time
- DateTime.UtcNow - to get current date & time in universal time (UTC)
- DateTime.ToUniversalTime - to convert local time to universal time
- DateTime.ToLocalTime - to convert universal time to local time
Hope this helps
Jay
"Mark" <marfi95@yahoo.com> wrote in message
news:f47c17d0.0408241507.65f44958@posting.google.com...
> Hey everybody.
>
> Is there an easy way in vb.net to convert the local time of a machine
> to US CST ? My machines are distributed throughout and the server is
> requesting we send the time of the txns in US CST.
>
> TIA,
> Mark
- Next message: Terry Olsen: "Is there a better way to "Wait"?"
- Previous message: Hal Rosser: "Re: Rows out of order !"
- In reply to: Mark: "datetime conversions - US CST"
- Next in thread: Mark: "Re: datetime conversions - US CST"
- Reply: Mark: "Re: datetime conversions - US CST"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|