Comments on: How to change date format in Excel and create custom formatting

The first part of our tutorial focuses of formatting dates in Excel and explains how to set the default date and time formats, how to change date format in Excel, how to create custom date formatting, and convert your dates to another locale. Continue reading

Comments page 5. Total comments: 563

  1. 01/10/2018 /3943 how can I change into normal date

    1. Jebin:
      Not sure what you mean by normal, but you can extract the first 10 characters like this:
      Where the data is in A2 enter this in an empty cell:
      =Left(A2,10)

  2. I am trying to format the date cell with 2 Sept 2018 with
    02-09-2018 But it's showing as 09-02-2018. Help

  3. I want date to be in 8-12-2018(8-Dec-2018) numeric format and hyphen instead of slash, is it possible?

    1. Abutalha:
      Format the cell as Custom.
      Right click the cell, select Format Cells then Custom and select the dd-mm-yy formatting from the list.

  4. Hi all,

    Can someone help convert the following:

    'Mon 17/09/2018' solely into '17/09/2018'

    All I want to do is delete the text

    1. Frank:
      If the only thing you want to do is return the date then this should work for you: =MID(B59,5,10)
      Where the data is in B59. The returned data will be text.

  5. Muath:
    When you go to Custom and select Date and choose DD/MM/YYYY in the Type field what does the cell display?

    1. I do it not response ...
      10/22/2015
      this example above . can you do it on excel

      1. change your system's date format according to you. then do it in excel. hope, this works.

    2. Currently on my spreadsheet I have 16-07-2018 DD/MM/YYYY however what I am trying to achieve is 2018-07-16 YYYY/MM/DD? I've tried the format cells and custom but it wont change to the format I am trying to achieve. I have over 10k lines in the spreadsheet.

  6. How to change date from 01012001 to 01/01/2001???

    1. Mahesh:
      If you want to simply add "/" to the text string the formula is: =MID(F44,1,2)&"/"&MID(F44,3,2)&"/"&MID(F44,5,4) where the data is in F44.
      If the data is text or something other than a date the formula is: =DATEVALUE(MID(F44,1,2)&"/"&MID(F44,3,2)&"/"&MID(F44,5,4))

  7. I have to enter the date 7/18/19 but it will not let me change it like that and I want to keep it like that in general. please help me!!

    1. Ronny:
      How is the cell currently formatted?
      Right click the cell choose Format Cells. Which one of those formatting options in the list are highlighted?
      Choose Date and then the format you want and see if that works for you.

  8. Chandrika:
    What do you want to do with the leading digit and hyphen?

    1. In the report i have two date format.

      1-12/3/2003
      Date/Month/Year

      2-27-08-2003
      Date/Month/Year.

      I want to date format as 27-08-2003 please suggest how to change the date format removing (/) using formula.

      thanks

  9. Hi,

    I exported data in this format March 2, 2012. I want to change it into 02/03/2012. I have tried separating into columns, change the format using customized format etc but it still didn't work. Can you please help? Thanks so much.

    1. Rananditra:
      Do you mean you imported some data?
      When you right click on the cell that holds the imported data can you change it to Date format.
      I'm thinking you might have imported text that looks like a date.

  10. How would I auto-populate the lease end date in excel? I.e. lease start date: 10/01/2018 with a 48 month lease would end on 09/30/2022. I am trying to find a formula to quickly generate the end date based on the start date and the amount of months. How would I do that?

    1. Alyssa:
      There are three formulae you can use to accomplish what you want.
      One is =EDATE(A1,48) where the start date is in A1 and you want the date 48 months hence.
      The second is =DATE(YEAR(A1),MONTH(A1)+48,DAY(A1)) where the start date is in A1 and you want the date 48 months hence. Each of these will return 10/1/2022.
      To get the 9/30/2022 date use =DATE(YEAR(A1),MONTH(A1)+2,0)
      All of these dates are correct, but you might want to use the last formula.

  11. Hi,

    I've got a cell formatted as date (dd mm yyyy), which is the system format. If I enter a date as 1/7/2018 or 01/07/2018, the cell displays 00 01 1900. Any other way of entering a date seems to give an error. I need to dates in date format in order to do some statistical analysis on the data as a time series. Any help would be appreciated.

    1. U need edit format- account-0 decimal

    2. Walt:
      Have you tried to change the format for the cell?
      Right click on the cell, select Format Cells and then choose a date format that displays the data the way you want. You may need to try a custom format the option for this is at the bottom of that same format cells window.

  12. Sir, I have write a date format in excel i.e. 05.05.2016 but i want to change it automatically in 05/05/2016 with the formatting option, I have tried many times but nothing change, so please do the needful at the earliest.

    1. Hi, I have entered in excel date as 3/01/2020 but it is displaying as 01/03/2020 i have tried date formats still it is not coming but, I need this date as United States format mm/dd/yyyy how can I change this help me.

    2. Shyam Lal:
      The easiest way to do this is to Find and Replace the "." with a "/". After you've done this Excel will recognize the entries as dates and then you can format them to be displayed in the format that suits you.
      Here's the procedure:
      Select the cells that hold the dates you want to change.
      Then click the Find and Select tool, then Replace to open the Find and Replace dialogue window
      Then enter a "." in the Find What field and a "/" in the Replace With field
      The first time you do this you should click the Find Next button then the Replace button. This way you can see what the Find and Replace procedure is doing to your data.
      When you're satisfied that Find and Replace is doing what you want you can click the Replace All button.
      When this procedure id finished, you can select the newly modified cells and click the Format Cells option and format the entries to be display in the manner you like.

      1. Thanxxx - I just remembered! :)

  13. I need to pull out the year from text that is November, 2016 but it won't change into any kind of date format and I don't want to manually enter years for 2000+ rows

    1. Hello, Marianne:
      Hello:
      I think the easiest way to is to select the cells and use the Text-to-Columns tool in the data tab.
      It goes like this:
      Practice with one cell.
      Select the cell that holds the "November, 2016".
      Choose the Text-to-Columns tool.
      Choose the Delimited button, click next.
      Choose the Other button and enter "," in the field, click next.
      Then you'll see how Excel will separate the data, click finish.
      You can select a destination cell if you need to. Keep in mind that the cell you select will be the first cell of two cells for the separated data.
      After this you will have the year separated in a destination cell as Date.
      Go through this same procedure for as many of the cells at one time as you want - one more or one hundred more.

  14. hi,
    i got data with format date is "May 10 2018" with space.
    how to change format this date like 14-Mar.
    please help...

    1. Kiki:
      I took your data and was able to format it into the display you wanted using these steps.
      First, select the data
      Second, under Data choose Text-to-Columns
      Third, Choose the Delimited button, click Next
      Fourth, Choose the Space button, click next
      Fifth, Choose the General button, not the Date option
      Sixth, Choose the Destination cells, click finish
      Seventh, enter this into an open cell =DATE(I9,MONTH(5&G9),H9)
      Where I9 is the address that holds the Year, G9 is the cell that holds the month name and H9 is the cell that holds the Day. I used MONTH in your data because it used the word "May" instead of the month value "5".
      Once this is complete you should be able to format this cell as Date in the Format Cells dialogue window.

  15. Hi,
    I have two types of date date format on one is date month year format but another one is month date year format and I want to make both the date as date month year format. Please guide me. Below are dates:

    28-02-2014
    22-02-2014
    20-02-2014
    20-02-2014
    19-02-2014
    18-02-2014
    18-02-2014
    18-02-2014
    17-02-2014
    16-02-2014
    15-02-2014
    15-02-2014
    14-02-2014
    13-02-2014
    13-02-2014
    13-02-2014
    12/2/2014
    11/2/2014
    11/2/2014
    11/2/2014
    11/2/2014
    11/2/2014
    10/2/2014
    9/2/2014
    9/2/2014
    8/2/2014
    7/2/2014
    7/2/2014
    7/2/2014
    7/2/2014
    7/2/2014
    7/2/2014
    7/2/2014
    6/2/2014
    6/2/2014
    6/2/2014
    5/2/2014
    5/2/2014
    5/2/2014
    5/2/2014
    4/2/2014
    3/2/2014
    3/2/2014
    3/2/2014
    3/2/2014
    2/2/2014
    2/2/2014
    2/2/2014
    1/2/2014
    1/2/2014
    1/2/2014
    1/2/2014
    1/2/2014

    1. Hello:
      I think the easiest way to reformat the first dates that are in the "Month/Day/Year" format is to select the cells and use the Text-to-Columns tool in the data tab.
      It goes like this:
      Select the cells you want to reformat.
      Choose the Text-to-Columns tool.
      Choose the Delimited button, click next.
      Choose the Other button and enter / in the adjoining field, click next.
      Choose the General button and enter the cell where you want the numbers to be entered, click finish. Remember, there will be one number per cell so you'll need three cells, but you'll only need to enter the first cell address. For example, $B$2.
      After this you have the numbers separated so you can concatenate them into one cell by putting this formula in a destination cell like this:
      =Concatenate(B2,"/",C2,"/",D2)
      Format this destination cell as Date and you're finished with the hard part.
      After you've done this you can delete the extra columns containing the result of the Text-to-Column procedure.
      Copy all of the finished dates into the original cells, select all of the cells containing dates, format them as dates under the Format Cells window in your version of Excel and you're ready to go to work.

  16. When I enter the date as 05/30/2018 it stays in the cell but when I enter the date 053018 It changes to a completely different date. Is there a way I can keep the cell from changing dates?

    1. Susan:
      Yes, Excel and dates/times can be exasperating.
      The easiest way I know to accomplish what you're trying to do is let Excel know the value is a date by entering the "/" or "-" and formatting the cell as a date.
      If you just enter a number as in your second example and format the cell as a date, Excel shows the number as the number of days from Jan 1 1900 which is the date the PC Excel world began.
      If you need a leading zero you can try formatting the cell as text, but you won't be able to do calculations directly on text.

      1. Thanks Doug for your help!

  17. Can you please help me if my date is in this format 27-03-2018 and I custom it to yyyymmdd the date stays 27-03-2018 in the formula bar?

    1. Hi Tracy-ann,

      What you see in a cell is only a visual representation of a date and you can change it to your liking by using different custom formats. The formula bar always displays dates in the default format.

  18. I want to change the date written in '02-02-18 format
    but i want to write 02-Feb-18 format

    1. Hello, Tushar,

      It looks like your date is formatted as text right now. First you need to convert it to the date format. You can do this by using the standard Excel Text to Columns feature. Just select the range with your dates, go to Data -> Data Tools -> Text to Columns, choose the “Delimited” data type on step 1 of the Wizard and click Finish. Your data will get the default date format, 2/2/2018.

      After that press Ctrl + 1 and specify the necessary Date format, 02-Feb-18, for your data in the Format Cells dialog window. Click OK.

      Hope this information will be helpful for you.

  19. help me subtract the dates below..i tried but i got -0.11

    13/05/2017 10:14:57 AM
    13/05/2017 7:40:04 AM

    thanks

    1. Hello,

      You can use a formula like this:

      =TRUNC(IF(A1>A2,A1-A2,A2-A1))&" days "&TEXT(IF(A1>A2,A1-A2,A2-A1)-TRUNC(IF(A1>A2,A1-A2,A2-A1)),"h:mm:ss")

      where cell A1 is “13/05/2017 10:14:57 AM”, cell A2 is “13/05/2017 7:40:04 AM”

      Hope it will help you.

  20. I am trying to convert a date from 20060911 (YYYYMMDD) to 09112006 (DDMMYYYY) I have tried to use the format but only received ########### is there a formula to do this?

    1. Hello, Toni,

      Suppose, your original value «20060911» is in cell A1. If you place this formula =TEXT(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)),"ddmmyyyy") in cell B1, for example, you’ll get the result you need.

      Hope this will work for you.

  21. How to convert a text string 10-Oct-2017 to a number in excel?

  22. I set date format to mmm-yy.
    I entered 9/99. Excel displayed Sep-99 as I expected.
    I entered 6/06. Excel displayed Jun-17. It did the same for all years after 2000.
    I finally figured out that I need to enter 6/2006 (not 6/06) for years after 2000 to get the correct display: Jun-06. Is Excel stuck in the last century/millenium? Is there a way around this -- the need to enter the full 4-digit year?

    1. Hello,

      I regret to tell you but this is a standard Excel behavior. For it to recognize whether you want to enter 2006 rather than June or 1906, you need to input all four digits of the year.

  23. when i enter 20/12/2008 as date in excel then it appers as 391204 so what can i do

  24. Madam,
    If already we have a some of Date format and filled in lot of coloumns then how can we convert another date format like Ex: 28.05.2015 it already done by lot of coloumns now we want 28-05-2015 this format. what can i do.

    1. Hello, Srinivas,

      you just need to select the cells with the data, press ctrl+1, go to Custom tab and set the following data format dd-mm-yyyy
      Hope it helps!

  25. Hello, Svetlana.

    Could you please help to change date format from 2016.12.22 12.35 to one in which the time is removed and becomes simply 22.12.16.

    Thank you!

    1. Hello, Undra,

      first of all, make sure to enter the date in the default format, which is: 12/22/2016 12:35

      Then, select the cell with this date, press Ctrl+1 to open the Format Cells window and switch to the Custom tab. There, in the Type field, enter the following: yyyy.mm.dd
      and click OK

      Voilà :)

  26. Hi,

    I want to change 16/03/2016 (text) to a date format: 2016/03/16

  27. Hi Hummayun,

    First select your date range then press ctrl+H and replace . with / hit enter.
    Now press ctrl+shift+3 that's it.

    1. Thanks alot Peshiyaboy...

  28. Hi,

    I have the year, for example 1979, but need it to be mm/dd/yyyy and the month and day just need to be 01/01. Example: 01/01/1979. How can I format the cells? When I do it, it doesn't recognize the year as the year so the numbers come out all mixed up.

    Thanks for your help.

    1. I have a date field with MM/DD/YYYY and I would like to eliminate the YYYY portion of the date field. I don't need the year in this date column
      Thank you

      1. Bob:
        Select the cell that contains the date, right click, select Format Cell. In the format window that opens select the Date option. You will see all the choices of date formats listed there including the one to only show the month and day.

  29. Hello Svetlana

    I'm trying to format this: 20490521 into date (2049 year, May 21). When I format it as a long date format it shows ##################. and wrights me that when dates are negative or too long it is shown with ########.

    How can I solve this?

    Thank you in advance.

    1. Hello Beka,

      Excel displays hash signs when there's not enough room in the cell to show a long date, in this case you just need to make the cell wider. In your case, Excel may not recognize the number as a date, and you will have to convert it as explained in How to convert 8-digit number to date in Excel.

  30. How to Convert 01.01.2016 to 01/01/2016 date format

  31. I am trying to write "08 - 16" which denotes "8 to 16" range but it is automatically converting 08 - 16 into August 2016 date format which I dont want. Please help me on how to keep the format intact.

    1. Hi Saurabh,

      Type it with the preceding apostrophe like this: '08-16

  32. I need to show Century in my date format, but I'm not understanding how to do this. Example:

    Format is CYYMMDD
    C=Century
    Years 2000-2099 C=1
    Years 1900-1999 C=0

    If date is 10/15/2016 on excel spreadsheet must show as: 1161015

    If date is 12/31/2039 on spreadsheet must show as: 1391231

    1. =IF(LEN(TRIM(TEXT('01'!D7,"mm/dd/yyyy")))-FIND("/",TRIM(TEXT('01'!D7,"mm/dd/yyyy")),FIND("/",TRIM(TEXT('01'!D7,"mm/dd/yyyy")))+1)=2,"1"&MID(TRIM(TEXT('01'!D7,"mm/dd/yyyy")),FIND("/",TRIM(TEXT('01'!D7,"mm/dd/yyyy")),FIND("/",TRIM(TEXT('01'!D7,"mm/dd/yyyy")))+1)+1,2)&LEFT(TRIM(TEXT('01'!D7,"mm/dd/yyyy")),2)&MID(TRIM(TEXT('01'!D7,"mm/dd/yyyy")),FIND("/",TRIM(TEXT('01'!D7,"mm/dd/yyyy")))+1,2),TEXT(YEAR('01'!D7)-1900,"000")&TEXT(MONTH('01'!D7),"00")&TEXT(DAY('01'!D7),"00"))

      You can change the Column-Row (D7) as per your sheet where Date will be there in format mm/dd/yyyy

  33. Hi,
    I want to change the date format for my data from 10/11/2012 14.30.00 to 10/11/2012 14:30:00
    Thank you in advance

    1. Hi Marcellin,

      The easiest way is to use Excel's Find and Replace feature:

      - Select all cells with dates that you want to reformat.
      - Press Ctrl+H to open Find and Replace.
      - Type a dot (.) in the "Find what" box, and colon (:) in "Replace with".
      - Hit Replace All.

      Done :)

  34. How can I change the date format of "07/22/2018" into "2018-07-22"? I have tried right click, format but the slashes wont change into dashes. :/

    1. READER THE UPPER SECTION DEAR

    2. Hello Dan,

      Select the cell, and Press Ctrl+1 to open the Format Cells dialog. On the Number tab, select Custom from the Category list and type the following format code in the Type box: yyyy-mm-dd

      1. Hi, I have tried this in my CSV file and it does work, but once I save it and reopen the file, it has converted it back to MM/DD/YYYY. What can I do so that when I do the Custom and change to YYYY-MM-DD it keeps it once saved?

  35. I have format of date is 03/apr/2015 but i want 03/04/2015 so how can i do ? tell me

  36. Hi Svetlana,

    I have a huge data set ranging from 2013 to 2016 and want to sort my data based on months, so have all the Januaries, Februaries, Marches, etc. together regardless of year. Is there a simple way to sort the data such?

    Many thanks.

    1. Hi Zianca,

      Here's a simple solution that comes to mind:

      1. In an empty column next to your Dates column, enter the formula to extract a month, e.g. =MONTH(A2)
      2. Apply Excel's AutoFilter and sort by the Month column, from smallest to largest.
      3. Delete or hide the Month column.

      1. Thank you very much! That is very helpful!

  37. I HAVE A EXCEL DATA FILE CONTAINING DATE IN FOLLOWING FORMATS

    4/1/2016 i.e. date/month/year how can i change it back to 1-4-2016

    1. Hello Salman,

      Just use the following format code to create a custom date format: m-d-yyyy

  38. I have a problem when I enable the date autoformat. When I key in 1/20 or 1-20, the excel autocorrects to 20-01-2016 as per my autoformat setting.
    The problem happens when I key 20/1 or 20-, the date is not autocorrected as a date..

    Please help. Thanks

    1. Hi Quek,

      To prevent this from happening, preface the fraction with a zero and a space. For example, instead of 20/1, type 0 20/1. Or, type a space or apostrophe before 1-20, like '1-20. The apostrophe won't be visible in cells, only in the formula bar.

  39. Dear Madam,
    I entered the value 23.5.2015 or 23.5.15 in a cell but how to change the value to date format(23-05-15) easily.

    1. Dear all,
      With reference to the above question, I found the answer from your link (Find and replace formula . to /).
      Thanks to Svetlana Cheusheva

  40. Hi,I have some numbers like "2-4" when I copy them to excel they appear like "4-Feb". I want the numbers keep their own format. Could you tell me how to convert?

    1. Hi Mehran,

      Try typing the numbers with a preceding apostrophe like '2-4.

  41. Hi Svetlana,

    Seems like you are the guru of Excel so here goes my question.
    I tried to add 7 days to my date format from a cell but it still comes us as #VALUE! For example my date was in A1 i typed =A1+7. No fixes around. Changed the whole worksheet's format to date as well but still does not work. Hope you can help.

    Thanks

    1. Hi Sam,

      It's a very simple, and correct, formula. You can test it on a new empty sheet and make sure it works fine. So, most likely the problem is with the source date in A1. An immediate reason that comes to mind is a date formatted as text. If it's the case, please try to convert it to date as explained in this tutorial:
      https://www.ablebits.com/office-addins-blog/excel-convert-text-date/

  42. We need to change format
    From to
    04-02-2016 02-04-2016
    04-02-2016 02-04-2016
    04-04-2016
    04-04-2016
    04-05-2016
    04-05-2016
    04-05-2016
    04-05-2016

    Please help me for the same

    1. Hello Binod,

      Select all the cells with your dates, press Ctrl+1, select 'Custom' under Categories, and type the following format in the Type box:
      dd-mm-yyyy

      Assuming that in "02-04-2016", 02 is the day and 04 is the month.

  43. in my excel sheet i am trying to split month, day, year but there's an issue. some date are typed as mm/dd/yyyy format but some are in dd/mm/yyyy. in first case (mm/dd/yyyy) when i split it works well but those cells that are in dd/mm/yyyy format appear with error. i'll be thankful if someone can help me out.

    1. Hi waqas,

      You can try to split the values according to their formats using the CELL function. For example:

      =IF(CELL("format", A1)="D1";parse1;parse2)

  44. I have an Excel date that I need to be just the month & year. Although I can format it to mm/yy when the data is entered for example as 10/18 (Oct 2018) Excel changes takes it as to 10/18/16 and shows 10/16. How can I correct this?

    1. Hi Nicole,

      This is the default Excel behavior.
      Looks like you need a VBA script for this task. Sorry we can't help you with this.

  45. Madam,

    I am unable to change the said date 24-08-2016 to 24-08-16, i tried different methods as u said above..i went through cutom typing ddmmyy but still displays the same format, Pls help

    1. Hi sabari,

      Please try the following formula:

      =TEXT(DATE(INT(MID(A1,7,4)),INT(MID(A1,4,2)),INT(LEFT(A1,2))), "dd-mm-yy")

      Where the value "24-08-2016" is in A1.

  46. I have problem changing the format of date.When i am entering 20.03.2016 manually in a cell and substituating "." with "/" and than changing it to with VALUE funtion and then applying TEXT function to get the as 20-March-2016.
    I am not getting the solution.

    Please provide relevant solution for this.

  47. How would I change a format of 20160328/222241
    into something like: 8-July-15 8:54AM?

    thank you

    1. Hi JOY,

      Please try the following formula:

      =DATE(INT(LEFT(A1, 4)), INT(MID(A1, 5, 2)), INT(MID(A1, 7, 2))) + TIME(MID(A1, 10, 2), MID(A1, 12, 2), MID(A1, 15, 2))

      Where the value 20160328/222241 is in A1.

  48. Can anyone help me, Im having difficulties with formatting the date in excel to look the same on all columns, this is the data I have for example:
    01-Feb-16
    12/31/2015
    01-Apr-16
    12/29/2015
    12/30/2015
    12/30/2015
    04-Jan-16
    12-Jul-15
    12/23/2015
    01-Apr-16
    11/13/2015
    01-Apr-16
    04-Jan-16
    04-Jan-16
    04-Jan-16
    01-Apr-16
    12/15/2015
    11/25/2015
    12/14/2015
    12/30/2015
    12/29/2015
    01-Apr-16

    but I need all the columns to look (example) 20-05-15.

    I have tried several things but can not get them all to the same format.

    Please help.

    Thanks

    1. Hi Marika,

      Please select all the columns where you want to change the format. Then right click and select the "Format cells..." option. In the "Format Cells" dialog select the Number tab - Date category, choose the format you want and click OK.

  49. My query is regarding date format. is it possible? if i enter a single number in cell and it show particular date. For example like current month is february 2016.

    if i enter 1 then it show 02/01/2016(mm/dd/yyyy)
    if i enter 15 then it show 02/15/2016(mm/dd/yyyy)
    if i enter 23 then it show 02/23/2016(mm/dd/yyyy)

    I just want to enter only one digit and it show me date of this digit with current month.

    1. Hi Kaps,

      Please try the following formula:
      =DATE(YEAR(TODAY()), MONTH(TODAY()), A1)
      Where the day number is in A1.

  50. Does anyone know how to convert a date in the 20131001 format to a date format of 10/1/2013, or vice versa?

    Thanks.

    1. Hi Todd,

      Please try the following formulas:

      =DATE(INT(LEFT(A1, 4)), INT(MID(A1, 5, 2)), INT(MID(A1, 7, 2)))

      =YEAR(A1) & TEXT(MONTH(A1), "00") & TEXT(DAY(A1), "00")

Post a comment



Thanks for your comment! Please note that all comments are pre-moderated, and off-topic ones may be deleted.
For faster help, please keep your question clear and concise. While we can't guarantee a reply to every question, we'll do our best to respond :)