+ Reply to Thread
Results 1 to 10 of 10

Converting date to US month format

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Converting date to US month format

    Hi,

    I have been using a formula to convert a date to a relevant month. As I am based in Australia, we would write 3rd October 2011 as 3/10/11. I have an IF statement I use which, if 3/10/11 was in A1, would be:

    =IF(A1="","",TEXT(A1*29,"mmmm")) This would return the value 'October' in the relevant cell.

    I now want to be able to use this formula with the US date format, which for 3rd October 2011 would be 10/3/11, however in its current format the formula returns the value 'March' instead of 'October'.

    Appreciate any help!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Converting date to US month format

    Hello Ozwilly,

    Provide the value in A1 is a Date and not Text you can extract the month correctly for Australia or the US this way.
    =IF(A1="","",MONTH(A1))
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Converting date to US month format

    Thanks, I have tried it and it is not working. I have attached an example worksheet (Excel 2007). What I am getting is a number, not a month, and am not sure how to format it. The number however is not correct for US as if the resulting '3' was converted into the month of the year it would be March not October.
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Converting date to US month format

    Hello Ozwilly,

    Sorry about that, I forgot that returned only the serial number of the month. This will return the full month name.
    =IF(A1="","",CHOOSE(MONTH(A1),"January","Februrary","March","April","May","June","July","August","September","October","November","December"))

  5. #5
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Converting date to US month format

    Hi, I posted a reply the other day but seems not to have stuck Unfortunately this formula is not working. If you refer to the attachment, I am trying to reflect the date 5th October 2011 in both Australian and US formats to show the relevant month.

    Using the formula, if I put in 5/10/11 for Australia, it correctly shows the month being October. In the US however 5/10/11 would be 10th May 2011 and I want the formula to show this to be the case. As I need to share this model with someone in the US and for it to work for them with the correct date format, is there something I can do in the formula or the Excel settings to ensure it is working correctly for either country? Even if I was able to save two copies, one being US specific and one being Australian specific that could work, however I am not sure how to achieve this?

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Converting date to US month format

    Hi,

    I posted a couple of weeks back however unfortunately have not had a reply that is solving my problem. I thought I would repost the question in case someone else can assist me. What I am trying to do is to show a date keyed in, as the correct month using TEXT. It needs to match both US & Australian formatting for dates - hopefully the information below will make it clearer


    If you refer to the attachment, I am trying to reflect the date 5th October 2011 in both Australian and US formats to show the relevant month.

    Using the formula, if I put in 5/10/11 for Australia, it correctly shows the month being October. In the US however 5/10/11 would be 10th May 2011 and I want the formula to show this to be the case. As I need to share this model with someone in the US and for it to work for them with the correct date format, is there something I can do in the formula or the Excel settings to ensure it is working correctly for either country? Even if I was able to save two copies, one being US specific and one being Australian specific that could work, however I am not sure how to achieve this?

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Problem with date formatting

    Hi,

    I posted a couple of weeks back however unfortunately have not had a reply that is solving my problem. I thought I would repost the question in case someone else can assist me. What I am trying to do is to show a date keyed in, as the correct month using TEXT. It needs to match both US & Australian formatting for dates - hopefully the information below will make it clearer


    If you refer to the attachment, I am trying to reflect the date 5th October 2011 in both Australian and US formats to show the relevant month.

    Using the formula, if I put in 5/10/11 for Australia, it correctly shows the month being October. In the US however 5/10/11 would be 10th May 2011 and I want the formula to show this to be the case. As I need to share this model with someone in the US and for it to work for them with the correct date format, is there something I can do in the formula or the Excel settings to ensure it is working correctly for either country? Even if I was able to save two copies, one being US specific and one being Australian specific that could work, however I am not sure how to achieve this?

    Thanks
    Attached Files Attached Files

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,768

    Re: Problem with date formatting

    If you have real dates in a spreadsheet then opening the worksheet in a different region shouldn't cause any problems - the date won't change.

    If you type in a date 5/10/2011 then that is recognised as an October date because your regional settings assume dd/mm/yyyy.....but if you send the workbook to somebody in the US normally the date will look different - it'll show as 10/5/2011, it'll still be October 5th

    [you can check that by changing your own Regional settings temporarily to US]

    ...and the text formula will still show October...

    Note this is simpler to get the month as text

    =TEXT(B3,"mmmm")
    Audere est facere

  9. #9
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Converting date to US month format

    Ozwilly,

    This was a duplicate post and as such does not comply with Rule 5 of our forum rules.

    These threads have been merged. Please do not create duplicate posts.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  10. #10
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Converting date to US month format

    Brilliant ! Thanks so much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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