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.

Along with numbers, dates and times are the most common data types people use in Excel. However, they may be quite confusing to work with, firstly, because the same date can be displayed in Excel in a variety of ways, and secondly, because Excel always internally stores dates in the same format regardless of how you have formatted a date in a given cell.

Knowing the Excel date formats a little in depth can help you save a ton of your time. And this is exactly the aim of our comprehensive tutorial to working with dates in Excel. In the first part, we will be focusing on the following features:

Excel date format

Before you can take advantage of powerful Excel date features, you have to understand how Microsoft Excel stores dates and times, because this is the main source of confusion. While you would expect Excel to remember the day, month and the year for a date, that's not how it works...

Excel stores dates as sequential numbers and it is only a cell's formatting that causes a number to be displayed as a date, time, or date and time.

Dates in Excel

All dates are stored as integers representing the number of days since January 1, 1900, which is stored as number 1, to December 31, 9999 stored as 2958465.

In this system:

  • 2 is 2-Jan-1900
  • 3 is 3-Jan-1900
  • 42005 is 1-Jan-2015 (because it is 42,005 days after January 1, 1900)

Time in Excel

Times are stored in Excel as decimals, between .0 and .99999, that represent a proportion of the day where .0 is 00:00:00 and .99999 is 23:59:59.

For example:

  • 0.25 is 06:00 AM
  • 0.5 is 12:00 PM
  • 0.541655093 is 12:59:59 PM

Dates & Times in Excel

Excel stores dates and times as decimal numbers comprised of an integer representing the date and a decimal portion representing the time.

For example:

  • 1.25 is January 1, 1900 6:00 AM
  • 42005.5 is January 1, 2015 12:00 PM

How to convert date to number in Excel

If you want to know what serial number represents a certain date or time displayed in a cell, you can do this in two ways.

1. Format Cells dialog

Select the cell with a date in Excel, press Ctrl+1 to open the Format Cells window and switch to the General tab.

If you just want to know the serial number behind the date, without actually converting date to number, write down the number you see under Sample and click Cancel to close the window. If you want to replace the date with the number in a cell, click OK.
Use the Format Cells dialog to get the number behind a given date in Excel.

2. Excel DATEVALUE and TIMEVALUE functions

Use the DATEVALUE() function to convert an Excel date to a serial number, for example =DATEVALUE("1/1/2015").

Use the TIMEVALUE() function to get the decimal number representing the time, for example =TIMEVALUE("6:30 AM").

To know both, date and time, concatenate these two functions in the following way:

=DATEVALUE("1/1/2015") & TIMEVALUE("6:00 AM")

Use the DATEVALUE and TIMEVALUE functions to find the number behind a given date and time in Excel.

Note. Since Excel's serial numbers begins on January 1, 1900 and negative numbers aren't recognized, dates prior to the year 1900 are not supported in Excel.

If you enter such a date in a sheet, say 12/31/1899, it will be a text value rather than a date, meaning that you cannot perform usual date arithmetic on early dates. To make sure, you can type the formula =DATEVALUE("12/31/1899") in some cell, and you will get an anticipated result - the #VALUE! error.

If you are dealing with date and time values and you'd like to convert time to decimal number, please check out the formulas described in this tutorial: How to convert time to decimal number in Excel.

Default date format in Excel

When you work with dates in Excel, the short and long date formats are retrieved from your Windows Regional settings. These default formats are marked with an asterisk (*) in the Format Cell dialog window:
Default date formats in Excel

The default date and time formats in the Format Cell box change as soon as you change the date and time settings in Control Panel, which leads us right to the next section.

How to change the default date and time formats in Excel

If you want to set a different default date and/or time formats on your computer, for example change the USA date format to the UK style, go to Control panel and click Region and Language. If in your Control panel opens in Category view, then click Clock, Language, and Region > Region and Language > Change the date, time, or number format.

On the Formats tab, choose the region under Format, and then set the date and time formatting by clicking on an arrow next to the format you want to change and selecting the desired one from the drop-down list:
Setting the default date and time formats in Control panel

Tip. If you are not sure what different codes (such as mmm, ddd, yyy) mean, click the "What does the notation mean" link under the Date and time formats section, or check the Custom Excel date formats in this tutorial.

If you are not happy with any time and date format available on the Formats tab, click the Additional settings button in the lower right-hand side of the Region and Language dialog window. This will open the Customize dialog, where you switch to the Date tab and enter a custom short or/and long date format in the corresponding box.
Setting the custom date and time formats

How to quickly apply default date and time formatting in Excel

Microsoft Excel has two default formats for dates and time - short and long, as explained in default Excel date format.

To quickly change date format in Excel to the default formatting, do the following:

  • Select the dates you want to format.
  • On the Home tab, in the Number group, click the little arrow next to the Number Format box, and select the desired format - short date, long date or time.

Quickly applying the default date and time formatting in Excel

If you want more date formatting options, either select More Number Formats from the drop-down list or click the Dialog Box Launcher next to Number. This will open a familiar Format Cells dialog and you can change date format there.

Click the Dialog Box Launcher to open the Format Cells dialog.

Tip. If you want to quickly set date format in Excel to dd-mmm-yy, press Ctrl+Shift+#. Just keep in mind that this shortcut always applies the dd-mmm-yy format, like 01-Jan-15, regardless of your Windows Region settings.

How to change date format in Excel

In Microsoft Excel, dates can be displayed in a variety of ways. When it comes to changing date format of a given cell or range of cells, the easiest way is to open the Format Cells dialog and choose one of the predefined formats.

  1. Select the dates whose format your want to change, or empty cells where you want to insert dates.
  2. Press Ctrl+1 to open the Format Cells dialog. Alternatively, you can right click the selected cells and choose Format Cells… from the context menu.
  3. In the Format Cells window, switch to the Number tab, and select Date in the Category list.
  4. Under Type, pick a desired date format. Once you do this, the Sample box will display the format preview with the first date in your selected data.
    Changing the date format in Excel
  5. If you are happy for the preview, click the OK button to save the format change and close the window.

If the date format is not changing in your Excel sheet, most likely your dates are formatted as text and you have to convert them to the date format first.

How to convert date format to another locale

Once you've got a file full of foreign dates and you would most likely want to change them to the date format used in your part of the world. Let's say, you want to convert an American date format (month/day/year) to a European style format (day/month/year).

The easiest way to change date format in Excel based on how another language displays dates is as follows:

  • Select the column of dates you want to convert to another locale.
  • Press Ctrl+1 to open the Format Cells
  • Select the language you want under Locale (location) and click OK to save the change.

Converting Excel dates to another locale

If you want the dates to be displayed in another language, then you will have to create a custom date format with a locale code.

Creating a custom date format in Excel

If none of the predefined Excel date formats is suitable for you, you are free to create your own.

  1. In an Excel sheet, select the cells you want to format.
  2. Press Ctrl+1 to open the Format Cells dialog.
  3. On the Number tab, select Custom from the Category list and type the date format you want in the Type box.
  4. Click OK to save the changes.

Creating a custom date format in Excel

Tip. The easiest way to set a custom date format in Excel is to start from an existing format close to what you want. To do this, click Date in the Category list first, and select one of existing formats under Type. After that click Custom and make changes to the format displayed in the Type box.

When setting up a custom date format in Excel, you can use the following codes.

Code Description Example (January 1, 2005)
m Month number without a leading zero 1
mm Month number with a leading zero 01
mmm Month name, short form Jan
mmmm Month name, full form January
mmmmm Month as the first letter J (stands for January, June and July)
d Day number without a leading zero 1
dd Day number with a leading zero 01
ddd Day of the week, short form Mon
dddd Day of the week, full form Monday
yy Year (last 2 digits) 05
yyyy Year (4 digits) 2005

When setting up a custom time format in Excel, you can use the following codes.

Code Description Displays as
h Hours without a leading zero 0-23
hh Hours with a leading zero 00-23
m Minutes without a leading zero 0-59
mm Minutes with a leading zero 00-59
s Seconds without a leading zero 0-59
ss Seconds with a leading zero 00-59
AM/PM Periods of the day
(if omitted, 24-hour time format is used)
AM or PM

To set up date and time format, include both date and time units in your format code, e.g. m/d/yyyy h:mm AM/PM. When you use "m" immediately after "hh" or "h" or immediately before "ss" or "s", Excel will display minutes, not a month.

When creating a custom date format in Excel, you can use a comma (,) dash (-), slash (/), colon (:) and other characters.

For example, the same date and time, say January 13, 2015 13:03, can be displayed in a various ways:

Format Displays as
dd-mmm-yy 13-Jan-15
mm/dd/yyyy 01/13/2015
m/dd/yy 1/13/15
dddd, m/d/yy h:mm AM/PM Tuesday, 1/13/15 1:03 PM
ddd, mmmm dd, yyyy hh:mm:ss Tue, January 13, 2015 13:03:00

How to create a custom Excel date format for another locale

If you want to display dates in another language, you have to create a custom format and prefix a date with a corresponding locale code. The locale code should be enclosed in [square brackets] and preceded with the dollar sign ($) and a dash (-). Here are a few examples:

  • [$-409] - English, Untitled States
  • [$-1009] - English, Canada
  • [$-407] - German, Germany
  • [$-807] - German, Switzerland
  • [$-804] - Bengali, India
  • [$-804] - Chinese, China
  • [$-404] - Chinese, Taiwan

You can find the full list of locale codes on this blog.

For example, this is how you set up a custom Excel date format for the Chinese locale in the year-month-day (day of the week) time format:
Creating a custom Excel date format for the Chinese locale

The following image shows a few examples of the same date formatted with different locale codes in the way traditional for the corresponding languages:
Custom date formats for different locales

Excel date format not working - fixes and solutions

Usually, Microsoft Excel understands dates very well and you are unlikely to hit any roadblock when working with them. If you happen to have an Excel date format problem, please check out the following troubleshooting tips.

A cell is not wide enough to fit an entire date

If you see a number of pound signs (#####) instead of dates in your Excel worksheet, most likely your cells are not wide enough to fit the whole dates.

Solution. Double-click the right border of the column to resize it to auto fit the dates. Alternatively, you can drag the right border to set the column width you want.

Negative numbers are formatted as dates

In all modern versions of Excel 2013, 2010 and 2007, hash marks (#####) are also displayed when a cell formatted as a date or time contains a negative value. Usually it's a result returned by some formula, but it may also happen when you type a negative value into a cell and then format that cell as a date.

If you want to display negative numbers as negative dates, two options are available to you:

Solution 1. Switch to the 1904 date system.

Go to File > Options > Advanced, scroll down to the When calculating this workbook section, select the Use 1904 date system check box, and click OK.
Switching to the 1904 date system

In this system, 0 is 1-Jan-1904; 1 is 2-Jan-1904; and -1 is displayed as a negative date -2-Jan-1904.
Negative numbers are displayed as negative dates

Of course, such representation is very unusual and takes time to get used to, but this is the right way to go if you want to perform calculations with early dates.

Solution 2. Use the Excel TEXT function.

Another possible way to display negative numbers as negative dates in Excel is using the TEXT function. For example, if you are subtracting C1 from B1 and a value in C1 is greater than in B1, you can use the following formula to output the result in the date format:

=TEXT(ABS(B1-C1),"-d-mmm-yyyy")
Use the Excel TEXT function to display negative numbers as dates.

You may want to change the cell alignment to right justified, and naturally, you can use any other custom date formats in the TEXT formula.

Note. Unlike the previous solution, the TEXT function returns a text value, that is why you won't be able to use the result in other calculations.

Dates are imported to Excel as text values

When you are importing data to Excel from a .csv file or some other external database, dates are often imported as text values. They may look like normal dates to you, but Excel perceives them as text and treats accordingly.

Solution. You can convert "text dates" to the date format using Excel's DATEVALUE function or Text to Columns feature. Please see the following article for full details: How to convert text to date in Excel.

This is how you format dates in Excel. In the next part of our guide, we will discuss various ways of how you can insert dates and times in your Excel worksheets. Thank you for reading and see you next week!

You may also be interested in

583 responses to "How to change date format in Excel and create custom formatting"

  1. Rabiul Korim says:

    I need Year-Month-Date how to Possible?

    • Hello Rabiul!
      I hope you have studied the recommendations in the above tutorial. Please let me know in more detail what you were trying to find, what format you used and what problem or error occurred. In that case I will try to help you.

      • Capt.T.I.Paul says:

        Dear Sir,
        In navigation problems we have situation where we have to find the duration between 2 times, e.g 23:00 and 01:25 then unable to do it

  2. Willy says:

    Hello Sir.
    How can we format the date using capital letter in excel for example 31 MAY 2020 instead of 31 May 2020?

  3. Thomas says:

    Great info, thx! I have the same question about capitals

  4. Aman says:

    hi
    i have problem in my excel sheet in date column. I have calendar period column in which date shows like 201810 in which last 2 digits are month and 1st 4 are year. i want to convert in date format like 10-2018. how to do this please help me with this.
    Thank You

    • Hello Aman!
      Please try the following formula:

      =DATE(LEFT(A13,4),MID(A13,5,2),1)

      Please go to Format Cells, choose Number -> Custom Format and set
      mm-yyyy
      Or instead of the date in the cell, you can write text and not use custom format:

      =TEXT(DATE(LEFT(A13,4),MID(A13,5,2),1),"mm-yyyy")

      I hope it’ll be helpful.

  5. david says:

    Hi,
    This appears to be a great source of information.
    I have a date with a time as :
    05/12/2020 23:59
    My excel sheet is interpreting as 5 December 2020 23:59 however it is meant to be 12 may 2020 23:59. It is data that is downloaded and both time and date come a single entry in the table I download. is there any way to convert it to be correct. I have now been trying for over 5 hours!!
    help is needed please.
    Best regards,

    David

    • Hello David!
      Check what date format you have installed on Windows. Go to Control Panel – Time – Region Settings – Change data formats
      I hope this will help, otherwise please do not hesitate to contact me anytime.

      • david says:

        Hi,
        Thank you for getting back to me. The problem is that the the website generating the data gas a glitch and is presenting the day and month in reverse. So if it was the 13 May 2020, the cell contains 5/13/2020 but yet the excel sheet thinks it is the 5 of the 13th month which obviously causes problems. They are working ona fix to the site now but i would like to know if there is anything i could do to convert it in the meantime in case they cannot fix the issue.
        Hope to hear from you soon,
        David

        • Hello David!
          Please try the following formula:

          =DATEVALUE(REPLACE(REPLACE(G1,1,2,MID(G1,4,2)),4,2, LEFT(G1,2))) + TIMEVALUE(REPLACE( REPLACE(G1,1,2,MID(G1,4,2)),4,2,LEFT(G1,2)))

          Please go to Format Cells, choose Number -> Custom Format and set
          dd mmmm yyyy hh:mm:ss
          I hope this will help, otherwise please do not hesitate to contact me anytime.

  6. Anne says:

    Hi,
    I am wondering if I have information in mm dd hh:mm:ss yyyy, is it possible to transfer it to yyyy/mm/dd hh:mm:ss.
    Anne

    • Hello!
      Please go to Format Cells, choose Number -> Custom Format and set
      yyyy/mm/dd hh:mm:ss

      I hope this will help, otherwise please do not hesitate to contact me anytime.

      • Tabish says:

        Hi Alexander,
        I have the same issue as Anne, and change the format using the custom format option.

        However, I was wondering if there was any way to make the change as permanent, as every time I open an excel file, I have to change it, and this happens several times a day, so it gets a bit frustrating at times.

        Thanks in advance for your help

        • Hello Tabish!
          When you enter a date or time in a cell, it displays in the default date and time format. This default format is based on the regional date and time settings specified in the Windows Control Panel and changes when you configure these settings in the Control Panel. Set the format there. I hope it’ll be helpful.

  7. Abdul Aziz Khan says:

    Hellow Ablebits Team,
    Have Changed the US date format(mm-dd-yy) to English (U K) (dd-mm-yy).Existing dates have changed successfully But with new entries in dd-mm-yy it does work, however it is OK with
    mm-dd-yy entries. What to do to have both entries & display in dd-mm-yy UK format.
    Best Regards
    Abdul Aziz Khan

  8. Avarma says:

    Hi
    I am adding 10.8 days to a date, and it is returning as 1/18/2020 4:55:54 AM and I cannot use vlookup again this returned date. How do I format the return date to only date? So I can use as only date format for other formulas. Thank you.

    • Hello Avarma!
      I’m sorry but your task is not entirely clear to me.
      For me to be able to help you better, please describe your task in more detail. Please let me know in more detail what you were trying to find, what formula you used and what problem or error occurred. It’ll help me understand it better and find a solution for you. Thank you.

  9. Mel says:

    Hi how can I change a field value from "Aug 10 1984 12:00AM" to
    "1984/08/10"(yyyy/mm/dd)
    Normal format "date" is not working

    • Hello Mel!
      Your value "Aug 10 1984 12:00AM" is the text. Therefore, turning it into a date can only be done using a formula.

      =DATEVALUE(SUBSTITUTE(MID(T1,5,3)&REPLACE(LEFT(T1,11),5,3,"")," ","/")) + TIMEVALUE(RIGHT(SUBSTITUTE(T1,"AM"," AM"),8))

      Please go to Format Cells, choose Number -> Custom Format and set desired format

  10. Dave says:

    Is there a 'switch' for date formats to force uppercase text?
    I am trying to display 'April 2020' (mmmm yyyy) as 'APRIL 2020' without the use of =upper() function as the date needs to be displayed this way in the same cell as it is entered.
    Thanks

  11. DILIP says:

    HAI
    I HAD A PROBLEM IN EXCEL THAT I HAVE TO SUBMIT A REPORT TO OFFICE.
    if I ENTER STARTING TIME AND TOTAL TRIPS DONE IN A DAY ( 5.30AM AND TRIPS DONE 5) SO, HOW TO CALCULATE THE ENDING TIME.
    (Sl.No DATE STARTING TIME END TIME TOTAL TRIPS WARD NO. / AREA FUEL IN TANK FUEL SUPPLIED FUEL CONSUMED BALANCE IN TANK
    1 01-May 5.30 AM 2.30 PM 6 0 50 18 32
    2 02-May 6.30 AM 5.00 PM 0 32 0 32
    3 03-May 5.00 AM 12.30 PM 0 32 0 32
    4 04-May 5.30 AM 1.00 PM 0 32 0 32 )

    IF I CHANGE TRIPS THEN THE ENDING TIME SHOULD BE CHANGE. CAN I GET SOME FORMULA TO DO MY WORK FAST

    • Hello!
      Please describe your problem in more detail. What exactly do you change on a trip? What determines the end time of a trip? How do you want to calculate it? Write an example of the source data and the result you want to get. It’ll help me understand it better and find a solution for you. Thank you.

  12. Naz says:

    I would like to change the dates of a whole spreadsheet by only changing the first date, is that possible and can someone help me with the formula please? I would like to change 01.06.2020 and would like the rest of the dates to add 1 more day so I do not have to type the dates everytime I use it for the following month.

  13. PattyPP says:

    Does anyone find it very odd that an extremely common date format like 01-Jan-2020 isn't available unless you add it as a custom dd-mmm-yyyy ?

  14. Karina B says:

    Hello!
    I am trying to sort my information by year. I already tried the custom format option provided above and it has been applied to all the fields. However, when I go the filter and try to sort the info by year, it will only work on half of the column. It seems as if some of the fields didn't recognize the custom format even though I already made sure that it was applied to all the data. Is there anything I can do?

  15. Tony O'Brien says:

    Hi
    I have a date issue where by in a cell with text & long date & need to convert into short date by MONTH/DAY/YEAR? This is a two formula process. BELOW IS THE TWO FORMULA'S
    1 = Randwick Saturday, 06 June 2020 =MID(Z6,MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},Z6&"0123456789",1)),LEN(Z6)+1)),LOOKUP(1,0*MID(Z6,ROW(INDIRECT("1:"&LEN(Z6))),1),ROW(INDIRECT("1:"&LEN(Z6))))+1)

    Returns = 06 June 2020

    2 =DATE(RIGHT(Z1,4),RIGHT(LEFT(Z1,2),2),LEFT(Z1,2))
    now converting to MONTH/DAY/YEAR
    = 6/06/1920

    This returns wrong year!
    Any help would be greatly appreciated

    Regards

    Tony

    • I assume that after the phrase Randwick Saturday, 06 June 2020, you still have a space. As a result, the text 06 June 2020 also has a space, that is, “06 June 2020”.

      I recommend checking this or using a formula with the TRIM function:

      =TRIM(MID(Z6,MIN(IFERROR(MIN( FIND({0,1,2,3,4,5,6,7,8,9},Z6&"0123456789",1)), LEN(Z6)+1)), LOOKUP(1,0*MID(Z6,ROW(INDIRECT("1:"&LEN(Z6))),1), ROW(INDIRECT("1:"&LEN(Z6))))+1))

      Now the date format function will work correctly.

      • Tony O'Brien says:

        Hi Alexander
        I tried the formula but still didn't get the date 6-06-2020.

      • Tony O'Brien says:

        Hi Alexander
        Sorry I got cut off, but to finish.
        There is a space between all texts & date plus at the end of years as well.
        In the formula there has space in where FIND, LEN & LOOKUP is, so cancel space ,but still didn't work. Tried { } as well.

        Regards

        Tony

        • Hello!
          I used your formulas and copied the text from your message. As I understand it, the first formula is written in cell Z1.

          =TRIM(MID(Z6, MIN(IFERROR(MIN(FIND({0,1,2,3,4,5,6,7,8,9},Z6&"0123456789",1)), LEN(Z6)+1)), LOOKUP(1,0*MID(Z6,ROW(INDIRECT("1:"&LEN(Z6))),1), ROW(INDIRECT("1:"&LEN(Z6))))+1))

          My second formula works when the formula is written in Z1

          I noticed that your second formula incorrectly determines the month. Use this formula

          =DATEVALUE(LEFT(Z1,2)&"-"&MID(Z1,4,3)&"-"&RIGHT(Z1,4))

  16. Aida says:

    Hello, can I set the date as below
    01-Mar-Y1
    Y1 indicates 2021.

    Is it possible ?

  17. Kataria V says:

    Sir, I want date separator "-" not "/" I have done almost everything but I am not getting desired results. My date format is dd-mm-yyyy whereas it is showing dd/mm/yyyy. Please help.

  18. Abhipsa says:

    Hello sir,
    I want to convert 2013.583 to date. Please help me

  19. Talha says:

    Hi, I have two different time with 12 hours format in two cells. The second cell required to covert for 24 hours format and the time difference between the two cell has to written in third cell.

  20. Stan says:

    I need to calculate negative days for calculating dates. When I use this formula =DATEDIF(A1, TODAY(), "d") and A1 is 6/22/2020 but TODAY is 6/19/2020 the calculation cell shows #NUM! but I need it to show -3. Can't figure out the formula. Any help would be great.

    • Hello Stan!
      You do not need to change the date format. You need to add the condition to the formula.
      If I understand your task correctly, the following formula should work for you:

      =IF(A1>TODAY(),-DATEDIF(TODAY(),A1,"d"),DATEDIF(A1, TODAY(),"d"))

      I hope my advice will help you solve your task.

  21. sailaja N says:

    I'm on the fence about this, while more customization is good, I have a feeling this is a "in-progress" update, it just feels incomplete and half-way there.
    We use badge layout for apps on design approvals (visual projects), so the image being displayed is important. Old layout "feels like" it had larger images,
    maybe because the images were cropped more loosely so it's easier to tell which project it was at quick glance. Now the image is cropped closer, making it
    harder to scan thru at quick glance. I find myself needing to click into the project more often than usual. Which makes the whole user experience less
    efficient.
    I have a couple suggestions that might make it work better:
    1. Increase the height of the window the cover image is being displayed.
    2. Let us to choose which image to be displayed as "cover" (like how Pinterest handles cover images of each board, was hoping for this for a long time)
    3. Let us adjust which part of the image to show and how tight or loose the crop is (with a fixed window, let us move the image around and maybe enlarge or
    shrink it to control what shows thru the window. Pinterest does a limited form of this, which is very useful in making the cover image relevant)
    4. Allow Cover Image to be ordered in different hierarchy (currently every element can be ordered differently except the Cover Image, it seems to be stuck
    in the 2nd spot, would like the option to set it on another spot in the layout. This one seems like an easy fix, since you guys allow that for every other
    element already)

  22. Ganesh says:

    HI,
    I need to change the date time 6/18/2020 10:09:53 AM format to "Jun-20"
    I tried using format cells option but its not working.
    pls advise
    Thanks.

  23. Shane says:

    Hello, I'm looking for a rather unique situation with dates in excel and uploading the spreadsheet to a e-commerce website with valid information.

    I currently have a heap of information in a .xlsx file and all works well except for date formatting. I have =NOW() which returns today's date in 25/06/2020. But when I copy the page and paste the values into a .csv file for upload it converts it to 44007.7716459491.

    The other issue is the site will not accept 25/06/2020 as a valid date format but it will accept 25.06.2020.

    Is there an easy formula to produce 25.06.2020 as an auto date, then also create another auto date +30 days in the same 25.07.2020 format?

    Or will I have to create different cells generating the date(A1), month(A2) and year(A3) and then combine them in the cell like =A1&"."&B1&"."&C1 ?

  24. Sakhawat Hydetr says:

    Hi!
    I want to change USA date format to UK date format in Excel. How can I do it? Please let me know it as soon as possible.
    Thanks.

  25. Rajiv says:

    Hello Team,
    Kudos on writing such a detailed and descriptive tutorial on this topic. It was really helpful.
    My question is regarding the topic "Creating a custom date format in Excel"
    I am able to create a custom format however it only remains in the Excel file I was working on.
    Is it possible to save that custom format so that its available as an option in any Excel file I work on? I just need this as an additional option and don't want to change the default date formats.
    Thanks.

  26. Neha says:

    Hello Sir,
    I have a whole sheet of Excel Data. In that, there a couple of columns where the dates are shown in the format, for eg (10 Dec 1990). I want to change that to the format as 10-12-1990. I tried Format cells and it worked on 1 cell.
    Is it possible to apply it to the entire column at once?? Apply that formula to the entire column of the worksheet?? It might take me ages to change the date format in each and every cell.

  27. Mathi Arumugam says:

    Dear sir
    here i got data like 07-05-20 1:58 is 5th july 2020 and next colum
    6/28/2020 8:25:27 PM june 28 2020 how to change by order..

  28. Shree says:

    I want to covert 1421020800000 value in date please help me

  29. MauriceN says:

    I want my dates to display in yyyymmdd format. I created it in custom but for 20200709 it returns with a value overflow (###### etc.) Is the format I want possible?

    • Hello!
      You entered 20200709 in your cell. This is not a date, but a number. Enter the date correctly. How to enter the date in the cell - read here

      • MauriceN says:

        Thank you for the answer Mr. Trifuntov.
        Alright, than I asked the wrong question.
        I want to enter my dates according to this format: yyyymmdd (so, 20200709), without the usual slashes or hyphens (2020/07/09 or 2020-07-09) because it is easier.
        Is there a way to make excel interpret 20200709 as a date or is there a way to add an entry-format in Excel?

        • Hello!
          You can enter a date in a cell without slashes and hyphens using the VBA macro. Or you can enter a number in another cell and then convert it in the cell you need to a date using Excel functions. You can read more about converting numbers to dates here.

          • MauriceN says:

            Thanks!
            This is exactly what I need. So simple, I should have been able to figure this out for myself!
            Sorry to have bothered you. :-)

  30. sam says:

    Hi ...I want to display date in excel as 12/31/9999 00:00:00.000000, I tried to use custom format (mm/dd/yyyy hh:mm:ss.sssssss) but the result I am getting is 12/31/9999 00:00:00.00. Please help here.

  31. Bard says:

    Hi can someone pls help me with an non responsive date change / sort order issue before I throw my computer out the window?

    I've spent over half an hour trying to sort this excel file (link below) into the correct date order. Its back to front and has all the latest dates at the top of the file instead of the bottom. Why is it back to front with the newest yahoo finance data at the top when I web query Yahoo?

    Why does excel not recognise that I am changing the date format to DMY so I can put it in the correct order with oldest dates at the top???

    Column A dates are ompletely unresponsive no matter how many specialist help resources I watch. What am I missing??

    Thanks in advance.

  32. Bard says:

    Hi Alexander, thanks for your quick reply but I don't see "Data - Sort - by Data. Then I selected the "Sort anything that looks a number, as number" checkbox." If I use the ribbon Data menu or the main top Data menu all I get on my Excel 2019 for Mac is:
    Pls see photos 1 to 3:
    https://www.dropbox.com/s/wnntscvzgqhdi54/1.png
    https://www.dropbox.com/s/m4mtma8yhx7owsw/2.png
    https://www.dropbox.com/s/733br30qo99ti0u/3.png
    Are you on a different version?
    Cheers,

  33. KRISHNA says:

    SIR,I HAD A PROBLEM IF I ENTER A DATE IN DATE COLUMN (170720)IS COVERTING TO THIS DATE(08-11-2668)SO WHAT FORMULA I WANT TO USE?AND I WANT A COLUMN IN WHICH I MANUALLY ENTER ONLY NUMBERS AND EXCEL SHOULD AUTOMATICALLY CONVERT TO DATE FORMAT, FOR EG. IF I TYPE 17072020 SHOULD BE CONVERTED TO 17/07/2020. THANK U

  34. Nandkumar Rashinkar says:

    Hi,
    I am suffering from an issue in Excel. Hope somebody will help me to resolve.
    Every time when I type a date in excel, it always returns the date in dd-mmm format and not in dd-mmm-yy format. Say for ex - If want to type a date 1-Jan-2020, then when I type 1/1 it only returns 01-Jan and not 01-Jan-2020.
    Can somebody help.
    Thanks in advance.

  35. Bat says:

    Hello.
    I have a question:
    25:04:01 it is my data that's format hh:mm:ss.
    I tried it to transport "hh" format. I used =Text(B2,"mm") but formula is not working that shows as like Month. How to transport this data to "hh" format that looks like 5,6hr etc.

  36. Bill says:

    I'd like to be able to add a comma in a time format...
    EXAMPLE: to hhave 1234:56 display as 1,234:56
    I haven't been able to find a solution in all of my searching. Certainly this is a possibility when working with thousands of hours -- like projects and company-based time cards.

  37. AA says:

    Hi,
    I need the following date format for some food products, in Canada

    Format for the Date is as follows: 08 JA 20
    January: JA
    February: FE
    March: MR
    April: AL
    May: MA
    June: JN
    July: JL
    August: AU
    September: SE
    October: OC
    November: NO
    December: DE

  38. Leo says:

    HI everyone,
    I need help to convert my report dates showing as Thursday, April 4, 2019 5:46 PM to 04/04/2019. Need to simplify the data.
    Thanks in advance

  39. JAGADEESH KUMAR K says:

    Sir, How to type date to date format (eg:2001.jan.1 to 2001.dec.31) in cell.

  40. Devika Richaria says:

    hello
    i want name and dob like devika 10/4/1996 but instead of date some numbers are appearing

  41. Skip Anderson says:

    If I enter a date as 12/19/1922, my date columns are formatted to display, 19 Dec 1922. If I enter a date prior to 1900, however, the formatting will not change.
    Also, I need to calculate the age of a person and I use =datedif(xx,xx,"y"). But, again,. the calculation won't work for any date prior to 1900.
    Is there a fix for both the formatting issue and the calculation?
    Thanks in advance for your help.

    • Hello!
      Excel does not work with dates before 1900. These dates are recorded as text. Therefore, it is not possible to apply the date format to them.
      To find the difference between dates before 1900, it is recommended to add 2000 years to each of them.
      You can use something like this:

      =DATEDIF(DATEVALUE(LEFT(A1,6)&(RIGHT(A1,4)+2000)),DATEVALUE(LEFT(A2,6)&(RIGHT(A2,4)+2000)),"y")

      If there is anything else I can help you with, please let me know.

  42. Princeton says:

    I do not know what I am doing wrong. I have imported dates into Excel as text values, however, using neither Excel's DATEVALUE function nor Text to Columns feature seems to work.

    In my spreadsheet, the dates are in column F and have the format "m/d/yyyy h:mm:ss AM/PM"

    For example, cell F2 contains the following text: ‎9‎/‎30‎/‎2020 ‎12‎:‎00‎:‎00‎ ‎AM

    I am able to use TRIM(LEFT(F2,FIND(" ",F2)-1)) to retrieve the date portion of the text, but when I attempt to use DATEVALUE(TRIM(LEFT(F2,FIND(" ",F2)-1))) to convert the text value to a date value, I receive a #VALUE! error.

    Please help.

    • Hello!
      Your formula is written correctly and should work. If you imported dates from another program, there may be various non-printable characters in the text. To check this, try manually entering the same information into the cell 9/30/2020 12:00:00 AM
      You can also try using this formula

      =DATE(--MID(F2,FIND("~",SUBSTITUTE(F2,"/","~",2),1)+1, FIND(" ",F2,1)-FIND("~",SUBSTITUTE(F2,"/","~",2),1)-1), --LEFT(F2, SEARCH("/",F2,1)-1), --MID(F2,FIND("~",SUBSTITUTE(F2,"/","~",1),1)+1, FIND("~",SUBSTITUTE(F2,"/","~",2),1)-FIND("~",SUBSTITUTE(F2,"/","~",1),1)-1))

      I hope it’ll be helpful.

  43. Almog Lahav says:

    Hello

    I have this format on cell A1: Sep 22, 2020 03:09:09 AM
    What formula do i need to us to change it to: 09/22/2020 and remove the time in cell A2

    thank you in advance

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =DATE(MID(A1,FIND("~",SUBSTITUTE(A1," ","~",2),1)+1,4), VLOOKUP(LEFT(A1,3), {"JAN",1;"FEB",2;"MAR",3;"APR",4;"May",5;"JUN",6;"JUL",7;"AUG",8; "Sep",9;"OCT",10;"NOV",11;"DEC",12},2,0), MID(A1,FIND(" ",A1,1)+1,2))

      I hope it’ll be helpful.

  44. Rob says:

    Hi My worksheet is split into 12 equal sections representing the 12 months of the year.
    I started gathering data in July and I’m trying to work out how to automatically have the word August in the second section and September in the 3rd section etc. without having to type it in manually.
    Thanks

  45. Jock McPhee says:

    Formula for following required :
    Todays date is September 01, 2020.
    Part A
    A tool is calibrated on Jan 01, 2020.
    It has a 6 month calibration cycle so it is overdue by 3 months
    How to show actual calibration due date and -3 month overdue date in 2 separate cells.
    Part B
    As above, but tool has calibration cycle of 24 months, therefore has 18 months remaining till due.

    I think one formula would work for both scenarios.

    Example :
    Cell A Cell B Cell C Cell D
    Calibration done cycle (m) Due Status
    Jan 01 2020 6 July 01 2020 -3
    Jan 01 2020 24 Jan 01 2022 18

    Thank You in advance for any help.

  46. Thomas says:

    I have a report with date, text & time with timezone in a cell and the requirement is to sort this in ascending order. I have tried to use delimiter, concatenate and also convert text to date but the "at" in between date & time is giving me issues and i am having a tough time sorting it. Can you please help

    Example:
    Thursday, April 16, 2020 at 6:23:36 PM China Standard Time
    Sunday, April 19, 2020 at 10:18:36 PM China Standard Time
    Saturday, April 18, 2020 at 3:23:36 AM China Standard Time
    Friday, April 10, 2020 at 1:23:36 AM China Standard Time
    Thursday, April 16, 2020 at 6:23:36 PM China Standard Time
    Sunday, April 19, 2020 at 10:18:36 PM China Standard Time
    Saturday, April 18, 2020 at 3:23:36 AM China Standard Time
    Friday, April 10, 2020 at 1:23:36 AM China Standard Time
    Thursday, April 16, 2020 at 6:23:36 PM China Standard Time
    Sunday, April 19, 2020 at 10:18:36 PM China Standard Time
    Saturday, April 18, 2020 at 3:23:36 AM China Standard Time
    Friday, April 10, 2020 at 1:23:36 AM China Standard Time
    Thursday, April 16, 2020 at 6:23:36 PM China Standard Time

  47. K ATUL says:

    How to change below mentioned date in excel with DD/MM/YYYY?

    2019-02-02 13:45:20

    Pls help Urgently

  48. SADIA says:

    Hi,

    I have date in this format September 9, 2019 in one of the excel columns. I want to change it to 9/09/2019.. I tried to apply the format from the formats provided in excel, but it did not work. Any help will be highly appreciated.

  49. SADIA says:

    Thanks for reply . I already tried this and it does not work and makes no change on dates in column.

  50. Geri says:

    I am downloading a report and my dates are coming up 16/01/2020 (so dd/mm/yyyy); however, the cell is formated as GENERAL and won't sort via the date.

    I have tried highlighting and formating the cells to Date - English (Canada) and picked dd/mm/yyyy; however, when I try to sort it is putting all the 01/??/???? together, then the 02/??/???? together.

    I have tried the Text to Columns and it isn't working - not all of the cells are changing over to date (if I scroll through some are still saying General).

    Is there any way to fix this issue??? Of note - I am downloading the report from ADP payroll provider.

    Thanks very much.

    Geri

  51. Aishwarya T says:

    Hello, I am trying to change the date in dd/mm/yyyy format from d/m/yyyy ... but it is not working as it is reading the text incorrectly, as if it is 1/9/2020 (1/Sept./2020) but it reads it as 1/Jan/2020.. Please help!

  52. Alex B says:

    Hello Alexander! Cannot get my head around this one. Didn't find an answer

    I have a date format

    11.11.2020 11:09:18

    I need it to be exactly

    Nov 11th, 2020 , 11:09 AM

    The main problem is with ending after date: 1st, 2nd, 3rd, 4th etc.

    Please help

  53. Shaira says:

    Hi, need help with converting these date: 11/23/2020 12:00:00 AM to 11/23/2020 and subtract by 7:00:00. My formula =IF(Z3="","",DATE(YEAR(Z3-"7:00:00"),MONTH(Z3-"7:00:00"),DAY(Z3-"7:00:00"))) doesn't work. Yet the formula works if the date is in 24hr format like: 11/23/2020 00:00:00. I already tried changing the DATE formats in control panel, customized the formats in excel to dd/mm/yyy hh:mm:ss but seems to not work at all.

  54. Pavani says:

    Hello Alex,

    I need to help-

    Example - i have date format in D cell - 15-JUL-20 and i want a formula to covert date to numberi.e 15

  55. Sena says:

    Hello , i have for example 19260101 this is first date of 1926 actually, But it is written just as general numbers, i need to fix it to date and 1926/01( yyyyy/month) , how can i fix it ?

  56. Thomas says:

    Am going to need some help but it’s ok

  57. Mansi says:

    How can I change date in this format "01st Jan 2021" to "01-01-2021"?

  58. Rick says:

    I am entering a date of 11/12/2020 in a cell. I am currently using custom format to display the date as 12-Nov Thu. I would like to display the date as 12-Nov Th. Is there a way to show this display with only the first two letters of the day?

  59. Ray Bernard says:

    What is the @ symbol for. It is shown in the screen shot in the "Creating a custom date format in Excel" section, and I see it in the Excel Format Cells dialog on my Windows computer, but I can't seem to find out what it represents. Can you tell me?

  60. Alon says:

    Thank you very much
    I had to switch to another computer after the old one kinda died after 10 years. I had Excel 2003.
    When I got Excel 2010 all dates in all excell docs were US and single digit months.
    I got the terrible 2/9/2018 and could not convert is to my beloved format 09/02/2018. Thanks to you It was easy. Just change the language from English US to English UK.

    Thanks

  61. Linda says:

    Hi, I'm working with a one drive spreadsheet that is auto generated from a google doc. One of the columns should show 'number of days' so I'd be expecting to see numbers in this column, however what I am seeing is dates. Some of these are post 1900 and I understand from your great description how to convert these to numbers but a lot are showing as pre 1900 e.g. 12/30/1899. Are these just zero values?

  62. alon says:

    i need to change the date and make it appear in dd / mm / yyyy form
    For a list of different dates
    What formula can be used to do this?
    July 18, 2015
    November 1, 2000
    etc.

  63. Jay says:

    Would it be possible to include a symbol before and after the date? Example: (01 January 2021). How do I format it to include and open and close parenthesis before and after the date?

    Thank you

  64. Monica says:

    Hey I have the following issue after converting a csv into regular excel: some of the values (that are supposed to be amounts) , are there as dates, example 11.31 has been converted into Nov 31 BUT if I change the format to number of text then I get the 11628. What can I do?

  65. Jenny says:

    Hi, I would like to put it as end-Dec-2020. I already change my date format to Mmm-yyyy. How can I add the word 'End' at the front?

  66. Johnny Becerra says:

    Hello!

    OBJECTIVE:

    My objective is to create a custom number format that can work for phone numbers AND dates inside the same cell. 

    EXAMPLE:

    (214) 999-0000 "HOUSE NOTES: PHONE NOTES: (214) 295-0021 (469) 258-5800 (214) 579-5707
    (469) 585-3485 (214) 475-6990 1/14/21 example of phone note 214.395.7623 1/14/21
    (214) 999-0000 example of phone note 469.363.3039 1/14/21 example of phone note MAIL
    LETTER NOTES:"

     
    EXPLANATION

    On the leftmost "cell", I've applied the following custom number format: (###) ###-####

    However, this format is not applicable on the rightmost cell with text because aside from having phone numbers, it also includes dates and words.

    QUESTION:

    What formula can be used to have all phone numbers in this format: (###) ###-### and also the date in this format: mm/dd/yy, while keeping text as is? (In this order as well: Phone, date, note)

    Any help is greatly valued!! Thank you!

    • Hi,
      The information you provided is not enough to understand your case and give you any advice.
      You have recorded a long text. What is written in the left cell? What is written in the right cell? What dates and words does it include? How many cells does your example occupy? A detailed description is required.

  67. Morgan van Holst says:

    I have an Excel file with mixed date formats in the Date column. Does anyone have a suggestion for a way to flip all the dates to the same format? I need to filter the entire sheet using the date and remove any entries that are more than 24 months old.

    Thank you,

    Here's a sample -

    27/08/2020 8:07:00 AM
    2018-01-11
    30/12/2020 1:34:00 PM
    14/09/2020 12:54:00 PM
    30/10/2020 10:09:00 AM
    22/12/2018 7:20:00 AM
    2020-03-11

  68. Robin Sabbagh says:

    Hi I have date format as ( sun 24/1/2021) I need to use a formula to transform it to DD/MM/YY

    Thank you for your support

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =DATE(RIGHT(REPLACE(A1,1,SEARCH(" ",A1,1),""),4),MID(REPLACE(A1,1,SEARCH(" ",A1,1),""), SEARCH("/",REPLACE(A1,1,SEARCH(" ",A1,1),""),1)+1, SEARCH("/",REPLACE(A1,1,SEARCH(" ",A1,1),""),4)- SEARCH("/",REPLACE(A1,1,SEARCH(" ",A1,1),""),1)-1), LEFT(REPLACE(A1,1,SEARCH(" ",A1,1),""), SEARCH("/",REPLACE(A1,1,SEARCH(" ",A1,1),""),1)-1))

      Hope this is what you need.

  69. Alex says:

    Hello!
    Is there a way to set the default month / year eg. to Feb / 2021 such that when I type '1' in the cell, it would automatically become 1-Feb-2021 instead of something like 1-Jan-1990

  70. Joan says:

    Hi, thanks for the tutorial, it's really helpful. But i wonder if you can help me on this one:
    i have the date of 1/2/2021 (1 Feb) at my timezone, but excel keep interpreting it as 2 Jan. So i have trouble when filtering, i would like to know how to make excel understand that? I can not change the data now as the input is quite big and spilling all over place. Can you help me? Thank you.

  71. Lori says:

    I need one column to be Monday then Wednesday then Friday all with the month and year
    and the other column to be Tuesday then Thursday then Saturday all with the month and year

    Is this possible? I've been trying and can't seem to figure it out.

    Thanks.
    Lori

  72. Abdullah says:

    how to change date and time format from 05012021 20:54:25 to 01/05/2021 20:54:25

  73. gina says:

    I can't seem to get it from 44256 to 3/1/21 I've clicked everything! plus I have a ton of questions I am using one of their preset ledgers. could this be the problem? Also, side help note question since I've been everywhere and this is so confusing. Is there a place where I can go and someone can look at what I have and maybe walk me through some things? because once it's set I'm good to go! Thanks for all the help everyone, I will talk all that I can get!! (I am using check register with chart) but trying to make it specific for me

  74. Marie says:

    Hi! I have an excel file and under the date column that has like this "190916". There is no specification as to what the format is but I am assuming it is in the yy/mm/dd format. I tried formatting it to the mm/dd/yyyy but whenever I try to change all of them, it just goes like this "9/15/2422".

    How can I change it into a proper mm/dd/yyyy format?

    Thank you.

  75. Md. Rezanur Rahman says:

    Dear Sir,
    In a excel sheet i have the following problem:
    04-12-81 18:00
    04-12-81 21:00
    13-4-1981 00:00:00
    13-4-1981 03:00:00
    In which first two are incorrect and last two are in correct format. Excel is reading first two as 4 December but actually they are 4 April. How can I correct these errors? I have copied data of around 40 years (1981 to 2020) in a excel sheet and I have to correct the incorrect dates. Please give your valuable suggestions.

    • Hello!
      To convert the date December 4th to April 12th, use the formula

      =DATE(YEAR(A1),DAY(A1),MONTH(A1)) + TIME(HOUR(A1),MINUTE(A1),SECOND(A1))

      I hope this will help

      • Md. Rezanur Rahman says:

        Thanks Sir. It works. But another problem is that I have a huge data set from 1981 to 2020. How can I filter those incorrect date formats quickly so that I can correct those data.

        • Hello!
          If I got you right, the formula below will help you with your task:

          =IFERROR(DATE(YEAR(A2),DAY(A2),MONTH(A2)) + TIME(HOUR(A2),MINUTE(A2),SECOND(A2)),DATE(MID(A2,SEARCH("-",A2,4)+1,4), MID(A2,SEARCH("-",A2,1)+1, SEARCH("-",A2,4)-SEARCH("-",A2,1)-1), LEFT(A2,SEARCH("-",A2,1)-1))+TIMEVALUE(RIGHT(A2,8)))

          Hope this is what you need.

  76. Gheragosian Eduard says:

    Hello.
    I have a table, 4 columns and a lot of rows with values 0 and 2.
    I need to replace the values like this 0 to 0.4/22 and 2 to 2/22.

    I searched everywhere and I dint find the answer.

    The thing is it auto-transform the text (2/22) into date, or into fractional. I need it to stay text. I have to replace them manual one after each other.

    I have Office 2019 .

    Thank you for your attention.

  77. Mayo Rocha says:

    Hi! My problem is when I type "Apr 3" in excel and click enter, the date that appears is April 1, 2001. The cell is formatted for the date to appear that way but the actual date that comes out is not April 3, 2021. This is happening on my laptop where I just installed Microsoft Windows 10.

    In my PC, that has Microsoft Windows 10, I do not have this problem with excel. I can type in Apr 3 and April 3, 2021 appears. Please help me solve this issue? Thank you

  78. Gufron Sunoto says:

    Greeting,

    How to change date format 08/04/2021 into 08.04.2021

    Thanks

  79. Gufron SUNOTO says:

    It's works- well done.
    thanks

  80. Gufron SUNOTO says:

    It's works- well done but when I want to copy its came back to dd/dd/yyyy
    thanks

  81. Gufron SUNOTO says:

    Thanks for reply.
    From the list of excel, I used the DOB to find t a person on database system that only dd.mm.yyyy format. So I copy it tang paste on format back to dd/mm/yyyy.

    Regards,

  82. Mark Anderson says:

    Hello,
    I spend 99% of my Excel time processing timestamped data from SQL Server which include milliseconds.
    My custom Excel format is: yyyy-mm-dd hh:mm:ss.000
    And it works perfectly but I always have to apply the formatting manually to cells in each sheet and then use format painter to change the other columns.
    I would like to setup Excel so that every time Excel wants to format any cell as any kind of date or time I want Excel to use my custom format, including ms.
    I tried using my Excel format string in Windows regional settings but the .000 for milliseconds is not accepted.
    Is this possible? and if so how?
    Thanks

  83. Rotimi says:

    Good day, I have this date formats 13/05/2020, 12/5/2020 in a workbook and I am unable to format the sheet.

    Any Help?

    Thanks

  84. Kavita says:

    How to change date format from "2020-Apr-27 " to 27-Apr-2020 in excel file

  85. JSG says:

    hello, how to change the time format using an excel function, example, converting this format (12:00 AM/PM) to (12-00-00 AM/PM), (12:00:00 AM/PM), (12 AM/PM) thanks

  86. Sai says:

    hi sir, i type 4/10 it is automatically changed to Apr-10. I need as it is (4/10).. How can i get it?????

Post a comment



Thank you for your comment! When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to your query. We cannot guarantee that we will answer every question, but we'll do our best :)