+ Reply to Thread
Results 1 to 17 of 17

US date & time to UK date & time - help!?!

  1. #1
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    US date & time to UK date & time - help!?!

    Hi all,

    Have found solutions using text to columns for converting US date format to UK date format.

    All good, expect my US source has time as well as date and I need it to be in UK format.

    I cannot find a solution that does that with the time in the mix - can anyone assist please?

    Attached is a sheet illustrating source format and desired output - would love the 3rd How column to have a solution in if possible please?

    Tried a few LEFT/RIGHT solutions but that formats got all screwed up.

    Can anyone assist please?

    Ian
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: US date & time to UK date & time - help!?!

    You show the time as 12:00:54 PM and want it to look like 0:00. This is incorrect. Your time is 54 seconds past noon so should look the same in UK time. I modified your first entry to to 12:00:54 AM to show midnight, which will show as 0:00.

    What you want to do is done trivially by custom format of "d/m/yyyy h:mm". Please see attached.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    Thanks - apologies, yes - I took the wrong desired outcome on my initial sheet.
    The source is from Facebook, but your third column solution is still in US format - month/day/year - desired outcome is day/month/year.
    Doing that AND the time, is foxing me.
    Original sheet reattached.
    Ian
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: US date & time to UK date & time - help!?!

    6StringJazzers spreadsheet looks correct to me.

    Realize that Excel will generally use the date appropriate for the locale. Here is the website.
    https://support.office.com/en-us/art...a-b4d30c528309

    Note the text which says:
    Note: Date and time formats that begin with an asterisk (*) respond to changes in regional date and time settings that are specified in Control Panel. Formats without an asterisk are not affected by Control Panel settings.

    I believe that is the default. So, you may not need to change the date, unless you expressly wish to show both formats.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  5. #5
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    Thanks - okay so have attached a screen cap of what his sheet looks like when I open it - this is why I'm asking on here as the formatting solution isn't working for me, neither does the one shown.
    The output is from facebook in column A.
    It needs to show as per column B (ignore the noon/midnight issue - the dd/mm/yy bit with time also added is what's tricky)
    Attached Images Attached Images

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: US date & time to UK date & time - help!?!

    Now, I think you have a bigger problem. What is your US source? If your source is giving you date values in Excel then the formatting should be totally transparent to you and you would never even notice. But I suspect you are getting text strings. You have presented them as Excel date/time to illustrate your question, which unfortunately caused all the confusion which I am about to explain.

    This is what it looks like when I open it, and if you look at your "Desired" column you will see why I provided the solution I did.

    times.JPG

    The problem with your file is that you put in fake dates to force the display to be a certain way, so I can't tell what the real dates are. For example, in column A you used June 10 and in column B you used October 6. You have UK localization in your Excel setup, so I see a different display than you do.

    The custom format of "d/m/yyyy h:mm" that I've already provided will show the UK version for date/time. But I don't think that's going to solve your problem.

  7. #7
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    Let's break it down, looking at row 2 only.

    We get, as a text string, from Facebook (said before) the following; 10/06/2017 12:00:54 (translated as October 6th 2017 at 12:00:54pm - US format on month and day order, but in text string format)

    I need it to show in date format as; 06/10/2017 12:00:54 (translated as 6th October 2017 at 12:00:54pm - UK format on month and day order and in date/time format)

    I know this needs a formula.

    Anyone?

    Am struggling with splitting out date portion only using a combo of MID/LEFT etc and DATE but getting nowhere yet.

    Thanks,

    Ian

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: US date & time to UK date & time - help!?!

    maybe use custom format on original : mm/dd/yyyy hh:mm:ss
    Attached Files Attached Files
    Last edited by sandy666; 05-10-2018 at 12:54 PM.

  9. #9
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: US date & time to UK date & time - help!?!

    If these are truly coming in as text strings as you show (i.e. using 2 chars for month, 2 chars for day, and 4 chars for year) then you can use this equation:
    =DATE(MID(E9,7,4),LEFT(E9,2),MID(E9,4,2))
    Assuming the text is in cell E9. This will then display the date per the local settings.

  10. #10
    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,939

    Re: US date & time to UK date & time - help!?!

    I just tried Pauleyb's formula and it worked as expected. Your regional date settings *should* then display the date as needed, but if not, just format the answer to what you need
    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

  11. #11
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    It's so odd - even with PauleyB's formula, I get;

    04/09/5009 00:00

    From this; 10/06/2017 12:00:54

    And that's with the cell formatted to dd/mm/yyyy hh:mm

    I'm gonna have to retype all the dates for now, as this isn't working however I try it, unless anyone has another suggestion.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: US date & time to UK date & time - help!?!

    You've (probably) UK regional settings (dd/mm/yyyy) so you can set M/D/Y (because source is in US style) via text2columns and excel should translate dates from US to UK automatically. Then set custom format for date & time: dd/mm/yyyy hh:mm:ss
    It works for me with your example

  13. #13
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    Thanks - does text to columns work when time is also present? I'll give it a go

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: US date & time to UK date & time - help!?!

    Try it, you can use Ctrl+Z if it doesn't work properly for you

  15. #15
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    And year 5009? Really?

  16. #16
    Forum Contributor
    Join Date
    08-21-2014
    Location
    London
    MS-Off Ver
    Office 365
    Posts
    232

    Re: US date & time to UK date & time - help!?!

    Okay, T2C has worked, unsure why it wasn't before but thanks Sandy666 for getting me over the line and to the others for the earlier assist. Had to concat the date and time values back into one but that was easy.

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: US date & time to UK date & time - help!?!

    here is example with two solutions (first is visual only not real)
    Attached Files Attached Files
    Last edited by sandy666; 05-11-2018 at 05:13 AM.

+ 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. Replies: 7
    Last Post: 06-19-2017, 06:10 PM
  2. Replies: 2
    Last Post: 03-24-2016, 11:49 PM
  3. Replies: 9
    Last Post: 02-15-2015, 07:32 PM
  4. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  5. Replies: 2
    Last Post: 08-12-2013, 02:38 PM
  6. Calculation of time difference between the Start date & time & End Date & time
    By Harry Jones in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-17-2012, 03:54 PM
  7. [SOLVED] Calculating days & time left from start date/time to end date/time
    By marie in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2005, 10:40 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