+ Reply to Thread
Results 1 to 17 of 17

Need to convert time and date together from one timezone to another

  1. #1
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Need to convert time and date together from one timezone to another

    First column the date and time are together and i need to go back 10 hours which would be 30th september 2019 14:00 PM ,

    Can you please provide the formula

    01/10/2019 00:00:29
    01/10/2019 00:01:16
    01/10/2019 00:01:51
    Attached Files Attached Files
    Last edited by AliGW; 02-10-2020 at 02:52 AM. Reason: Urgency statement removed from thread title.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Urgent help required - need to convert time and date together from one timezone to ano

    Try this...
    =A2-(10/24)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    Hi i need to subtract 6 hours from the below , i have tried the formula A1-6/24 , it doesnt work . It is a 12 hour AM/PM time format

    6/25/2020 2:59:56 PM

  4. #4
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    You need brackets:

    =A1-(6/24)

    Administrative Note:

    Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.

    With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).

    Thank you for helping us to help you.
    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.

  5. #5
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    Hello AliGW

    It does work and puts the word "VALUE" in cell and says the value used in the formula is of the wrong data type.

  6. #6
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    OK - attach a workbook.

  7. #7
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    I am unable to attach the file. Can you copy the text that i have provided into singles cell without any spaces and provide me the workbook with the formula

    6/24/2020 8:24:04 PM
    6/25/2020 2:39:56 PM
    6/27/2020 3:28:51 PM
    6/28/2020 3:32:37 PM
    6/25/2020 4:15:19 PM
    6/25/2020 4:07:18 PM

  8. #8
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    No, because that won't get to the bottom of the problem, sorry.

    You need to provide a WB that shows the issue.

    What is stopping you?

    The dates you have just posted are in US format - I suspect there is a settings issue, but I can't be sure without seeing the WB.
    Last edited by AliGW; 07-01-2020 at 08:37 AM.

  9. #9
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    How do i attach it ? i am unable to see the option.

  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
    81,224

    Re: Need to convert time and date together from one timezone to another

    Start a post, then click Go Advanced bottom right - scroll down to Manage Attachments.

  11. #11
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    Hi

    I have uploaded the attachment here
    Attached Files Attached Files

  12. #12
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    As I suspected, the entries are just text, not date values. Where have they come from? How have you imported them? They Are in US date format, so you are going to need to convert them to dd/mm/yyyy before you can work with them.

    https://kickthatcomputer.wordpress.c...rmat-in-excel/

  13. #13
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    You could also try this formula in B2:

    =IF(ISTEXT(A2),--SUBSTITUTE(TRIM(MID(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9)&REPLACE(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9,""))," ","/")+IF(ISTEXT(A2),--MID(A2,FIND(" ",A2)+1,99),A2),A2)

    This will convert your text into date format.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    Hi AliGW

    Thanks i have tried the steps provided in the link but it doesnt work , The entry stays as 6/24/2020 8:24:04 PM and doesnt get converted into 24/6/2020 8:24:04 PM

    I have also tried your formula , it converts text into date format but it doesnt subtract 6 hours from the time , it has added 18 hours to the time


    6/24/2020 8:24:04 PM has become 25/06/2020 14:39

  15. #15
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    From the workbook attached to my last post:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    1
    Timezone
    2
    6/24/2020 8:24:04 PM
    24/06/2020 20:24
    25/06/2020 02:24
    3
    6/25/2020 2:39:56 PM
    25/06/2020 14:39
    25/06/2020 20:39
    4
    6/27/2020 3:28:51 PM
    27/06/2020 15:28
    27/06/2020 21:28
    5
    6/28/2020 3:32:37 PM
    28/06/2020 15:32
    28/06/2020 21:32
    6
    6/25/2020 4:15:19 PM
    25/06/2020 16:15
    25/06/2020 22:15
    7
    6/25/2020 4:07:18 PM
    25/06/2020 16:07
    25/06/2020 22:07
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    B
    C
    2
    =IF(ISTEXT(A2),--SUBSTITUTE(TRIM(MID(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9)&REPLACE(SUBSTITUTE(LEFT(TEXT(A2,"dd/mm/yyyy"),10),"/",REPT(" ",9)),9,9,""))," ","/")+IF(ISTEXT(A2),--MID(A2,FIND(" ",A2)+1,99),A2),A2)
    =B2+(6/24)
    Sheet: Sheet1

  16. #16
    Registered User
    Join Date
    10-01-2014
    Location
    UK
    MS-Off Ver
    2013
    Posts
    41

    Re: Need to convert time and date together from one timezone to another

    Hi Ali

    Never mind , i have seen the file you provided and have used the formula from it and it works now

    Thanks for your help

  17. #17
    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
    81,224

    Re: Need to convert time and date together from one timezone to another

    No worries.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. timezone time date hour substraction
    By xatomicx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2019, 03:24 PM
  2. how to convert GMT to any local timezone
    By bsuren in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2019, 10:58 PM
  3. Change written date (Day, day month time timezone) to date string
    By ABBOV in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2017, 05:08 AM
  4. [SOLVED] Calculating Time After Midnight and Convert Timezone
    By purevibe in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-31-2017, 05:47 PM
  5. Replies: 1
    Last Post: 04-18-2016, 07:43 AM
  6. Hot to change date and time for different timezone?
    By Ana_b in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-05-2015, 04:35 PM
  7. converting date and time to EDT/EST TimeZone
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-15-2009, 10:07 AM

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