+ Reply to Thread
Results 1 to 26 of 26

American Date to British Date Format

  1. #1
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    American Date to British Date Format

    How do I convert the dates to British dates - the dates are in Jul and Aug.

    Thank you.
    Attached Files Attached Files
    Last edited by josephteh; 09-14-2022 at 06:35 AM. Reason: Upload a new file

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: American Date to British Date Format

    For your example this can work:

    =DATE(YEAR(A1),DAY(A1),MONTH(A1))

    But it won't work for dates after the 12th of the month. Please show me what the format of your input data looks like for such dates.

  3. #3
    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,896

    Re: American Date to British Date Format

    1. Select column A.
    2. Data ribbon | Text to Columns.
    3. Click Next > Next > choose DMY > Finish.

    Then change the column formatting to SHORT DATE.
    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.

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Thanks Nick, but 1st July is not converted correctly.

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Thanks Ali, I need a formula-based approach.

  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
    80,896

    Re: American Date to British Date Format

    You did not say this in your opening post!

    In B1 copied down:

    =A1+0

    Set formatting for column B to SHORT DATE.

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Apologies, A1. Thanks, but the formula converts Jul date correctly, but not Aug dates.

  8. #8
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: American Date to British Date Format

    The July date also already had a value associated with July.
    The August dates have the values ​​of resp. 8 Jan, 8 Feb and 8 March.

    These 3 dates can be converted with this formula: =DATE(YEAR(A2),DAY(A2),MONTH(A2))

  9. #9
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: American Date to British Date Format

    You have changed your sample since my first response. You still haven't given an example of your input for dates after the 12th of the month.

    In your latest file, cells A1 to A4 contain the date values of:

    1st July
    8th January
    8th February
    8th March

    As you said the dates are all meant to be in July and August, I presume the first one is already correct. The other 3 can be converted to August using the formula I gave before. But as I said before this won't work for dates after the 12th, since it won't be formatted as the 8th day of the 13th month. I suspect it will be a text format and need some MID formulae to process, but unless you share the format then we can't help!

  10. #10
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Hi Nick, I changed my sample at 6.35pm and you must have read it before I changed it with your response at 6.37pm. Oh dear.. so sorry.. I should have opened a new thread.

  11. #11
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Thanks Hans. Yes, indeed Jul date is correct. But I need a formula to detect it and convert all the cells in A1 to A4 to proper dates with similar formulas.

  12. #12
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: American Date to British Date Format

    The problem is, if some dates are already in UK format and others are in US format, how do we know which is which?

  13. #13
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: American Date to British Date Format

    If the day <= 12 there is no formula that can detect whether to swap month and day.

  14. #14
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Is it possible to detect based on the display formats? Noting UK dates show the time as 12:00:00 AM, while US dates show time as 0:00?

    American to British Date Format.png

  15. #15
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: American Date to British Date Format

    In the current sample file, the dates are stored as numbers, so you should be able to get any date/time format you want (within the limits of number formatting). Some date formats (like the "short date" format mentioned by AliGW) will refer to the computer's regional settings to decide what "short date" looks like on the current computer. When I open your file, I see that A1 is formatted as m/d/yyyy h:mm:ss AM/PM. The AM/PM is what controls the 12 or 24 hour clock. A2:A4 are formatted as m/d/yyyy h:mm. The absence of AM/PM specifies 24 hour clock.

    If a date serial number is not formatted the way you want, you should be able to simply change the number format to what you want. If by "British Date" you mean "date/month/year with a 24 hour clock", then "d/m/yyyy 0:00:00" should work. If you want a 12 hour clock, add and AM/PM indicator.

    Unless there is something more to the question that I am not understanding, it really should be as simple as applying the desired number format.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  16. #16
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Thanks MrShorty for your explanation. The problem is the file is shared by a third party and somehow the date format is not consistent. Within the same month, there could be 2 different formats. As mentioned in my post #14 above, the only way we could identify is by the date format: UK dates show the time as 12:00:00 AM, while US dates show time as 0:00. I was told the problem is somewhat related to the Mac. There are more than few thousand rows of data and we are unable to sort them and therefore unable to use different formulas to convert them.

  17. #17
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: American Date to British Date Format

    Please try in A2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 09-14-2022 at 09:54 PM.

  18. #18
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    You nailed it, Hans!! Thank you!

  19. #19
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: American Date to British Date Format

    Good to hear it works. Thank you for the feedback and rep. .
    I also learned how to test for format.

  20. #20
    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,896

    Re: American Date to British Date Format

    Nice solution, Hans - one for the toolkit!

  21. #21
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: American Date to British Date Format

    Still won?t work if there are US formatted dates after the 12th of the month?

  22. #22
    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,896

    Re: American Date to British Date Format

    Here's a fix:

    =IF(CELL("format",A1)="D4",A1,IFERROR(DATE(YEAR(A1),DAY(A1),MONTH(A1)),DATE(MID(A1,7,4),LEFT(A1,2),MID(A1,4,2))))

  23. #23
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Thanks Nick for sporting the errors and thanks Ali for the fix!

  24. #24
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: American Date to British Date Format

    @joseph - does that work? You've still not shared what the format actually is for dates after the 12th. If they look the same but are formatted as text then Ali's solution should work.

    @Hans - nice solution. I didn't realise the formats had values you could reference e.g. "D4", I would have done something like =IF(CELL("format",A1)=CELL("format",$A$1), and so on.

  25. #25
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: American Date to British Date Format

    I didn't realise the formats had values
    I didn't realise either until I tried =CELL("format",A1) .

  26. #26
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,060

    Re: American Date to British Date Format

    Yes, with Ali's fix, it works perfectly in my actual data.

+ 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] American Date to English Date Format.
    By K-Linerz in forum Excel General
    Replies: 11
    Last Post: 10-28-2016, 10:57 AM
  2. [SOLVED] Date changing to American format
    By JamesT1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2015, 10:17 AM
  3. [SOLVED] American to British Date
    By namluke in forum Excel General
    Replies: 3
    Last Post: 08-12-2015, 10:27 AM
  4. Date Converted to American Format
    By TimTDP in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-17-2011, 02:32 PM
  5. Why is the date changing to American Format
    By darbid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2010, 10:00 AM
  6. American/British Date format issue
    By hriggs in forum Excel General
    Replies: 4
    Last Post: 05-29-2008, 08:09 AM
  7. [SOLVED] text or american date format
    By Marshall Scmidt in forum Excel General
    Replies: 2
    Last Post: 03-24-2006, 02:55 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