Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to get Timezone in VBA (for Excel)?

Hi,

I need to figure out how to capture the timezone setting
for the local machine and then convert it to GMT? Any
tips on how to do this, with considerations for Daylight
savings time etc...

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to get Timezone in VBA (for Excel)?

Devangi,

See http://www.cpearson.com/excel/timezone.htm for information and
an example workbook. You'll want to use the CTime class in the
sample workbook.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Devangi Gandhi" wrote in message
...
Hi,

I need to figure out how to capture the timezone setting
for the local machine and then convert it to GMT? Any
tips on how to do this, with considerations for Daylight
savings time etc...

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to get Timezone in VBA (for Excel)?


Hi Chip,

The converttoGMT function you have provided only converts the time
portion to GMT, but it does not convert the date.

E.g. Now = 7/31/2003 13:47
and if I do converttoGMT(7/31/2003 13:47) I get 18:47:10, I don't get
the date portion 7/31/2003...

I am new to Excel VBA programming and if youcan help me here I'd greatly
appreciate that...

Thanks,
Devangi.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timezone converter Chris Excel Worksheet Functions 1 June 13th 07 04:21 PM
How do I convert GMT date/time to different timezone Hooves57 Excel Worksheet Functions 2 August 30th 06 05:36 AM


All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"