RobertFromSecretWeapons
asked on
Convert GMT DateTime to EST DateTime (and vice versa)
Hi,
VB.Net Framework 4.0 question...
1 - I need to convert a string value such as this "2005-09-01T04:00:00.00000 0Z" which is GMT(Zulu) time to a DateTime object that represents the corresponding Date and Time in Eastern Standard Time (irrespective of the PC's time zone which this subroutine would run on). The resultant EST Date and Time value must be adjusted for Daylight savings time if in effect or just EST if not (you get my meaning).
Additionally.
2 - Similar and somewhat conversely to the above, I also need to convert a string value such as this "2005/01/19 16:30" which would represent an EST Date and Time value to a GMT string value such as "2005-01-19T21:30:00.00000 0Z"
I read the MSDN article on this but my development PC is on MST and fouls up the results.
VB.Net Framework 4.0 question...
1 - I need to convert a string value such as this "2005-09-01T04:00:00.00000
Additionally.
2 - Similar and somewhat conversely to the above, I also need to convert a string value such as this "2005/01/19 16:30" which would represent an EST Date and Time value to a GMT string value such as "2005-01-19T21:30:00.00000
I read the MSDN article on this but my development PC is on MST and fouls up the results.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Produces the following output --saige-