+ Reply to Thread
Results 1 to 10 of 10

How to convert from indian time zone to US time zone

  1. #1
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    How to convert from indian time zone to US time zone

    Hi all,

    I need some serious help here, not sure if this is possible. I have below Time stamp code.

    which inputs current system time, All the system time will be in Time zone of (UTC-05:00) Eastern Time (US & Canada)

    i am fine with system inputting this time.


    The challenge is, some of the system will be in Time zone of (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi.
    Here i need help of Vba code to convert actual Timzone time to (UTC-05:00) Eastern Time (US & Canada) and according to my code
    the converted time will be stamped in active cell.


    Time zone (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi should be converted to (UTC-05:00) Eastern Time (US & Canada).

    my code is as follows,
    Please Login or Register  to view this content.
    Thank you

    If I have helped you in someway, use the * icon below to give reputation feedback, it is appreciated.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to convert from indian time zone to US time zone

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to convert from indian time zone to US time zone

    Hi ,

    I have attached sample file.

    My system time zone is in (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
    when i ran my code, it published the current time as 04:59:40 Pm.


    I need macro to publish the time in following time zone (UTC-05:00) Eastern Time (US & Canada) always.


    If my system time zone is already in Us & Canada time zone, then macro can publish the current time as it is.
    If my System time zone is in "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi" then macro should convert the system time
    to "(UTC-05:00) Eastern Time (US & Canada)" and publish the revised time.


    So core point is macro should publish only in "(UTC-05:00) Eastern Time (US & Canada)" time zone, current time.

    hope i have given details.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to convert from indian time zone to US time zone

    If there is 11.5 hours difference between Indian and USA time then an Indian time 4:59:40 PM should convert to a US time of 5:29:40 AM.
    So why do you say it should be 7:30:04 AM?

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,009

    Re: How to convert from indian time zone to US time zone

    .
    Could it be because India does not use Daylight Savings Time and the US does ?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to convert from indian time zone to US time zone

    Quote Originally Posted by Logit View Post
    .
    Could it be because India does not use Daylight Savings Time and the US does ?
    Yes it's a possibility and the time difference is 9.5 hours not 10.5. But in practice unless there's something in the data to tell the formula to adjust for daylight saving, unless of course that can be deduced from the date, then I don't see how it can be worked out.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,600

    Re: How to convert from indian time zone to US time zone

    Please Login or Register  to view this content.
    Ben Van Johnson

  8. #8
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: How to convert from indian time zone to US time zone

    Hi Ben and all,

    I appreciate each one of your contribution on this.

    i have tested the code, it does converts Indian time to US time.

    However, if my system time zone is already in US time zone then i dont want any changes in publishing time.
    So if my time zone is in Indian standard time then this conversion should happen.

    is this possible ?

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: How to convert from indian time zone to US time zone

    The following code is from Chip Pearson. Put it in a standard module and run the AAA procedure. You can then use the StandardName variable value in an IF test to determine whether you need to apply the conversion or not.

    Please Login or Register  to view this content.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to convert from indian time zone to US time zone

    The late, great Chip Pearson - sadly missed on all forums he frequented.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] What formula can convert the date and time zone in Excel??
    By coffeefirst in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-09-2016, 05:19 PM
  2. Input: Time Zone. Output: Current Time
    By imsteve123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2015, 09:16 PM
  3. Need Help with an user form that convert GTM Time to Other selected Time Zone
    By odoualex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2014, 11:52 AM
  4. Date and time conversion to another time zone
    By RUBEN PARRAS in forum Excel General
    Replies: 1
    Last Post: 05-21-2012, 09:03 PM
  5. [SOLVED] How to set a formula to convert the time zone
    By Calculate Date range in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2006, 03:50 AM
  6. How to convert phone area-code to state name and time zone
    By NoYouShmoopie in forum Excel General
    Replies: 2
    Last Post: 10-07-2005, 10:05 AM
  7. Converting Time Values from One Time Zone to Another
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-23-2005, 12:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1