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.
  5. If you are happy for the preview, click the OK button to save the format change and close the window.

Changing the date format in Excel

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

Tip. Using a custom date format, you can easily display the day of the week from date.

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. For more details, see How to fix #### error in Excel.

Negative numbers are formatted as dates

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.

Tip. If none of the above tips worked for you, then try to remove all formatting and then set the desired date format.

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!

918 comments

  1. Hi,
    How would formula would I need to convert the following time stamp formats?:

    from:
    2019-09-25T14:00:03.000Z
    to:
    25/09/2019 14:00:03.000

    Many thanks

  2. hi,
    i want to insert serial wise numbers for particular month placed orders?
    Such as 21-year,07-month,and in that month placed orders one by one.

    i got upto (yy,mm PR). I want that to be in order like 210701 PR,210702 PR,210703 PR,210704 PR,210705 PR.

    Please help me out

  3. I have the issue that when I copy a BOM from another program I have certain numbers with the format "1.1.1" which are converted to "01.01.2001". This is fine when I copy them as I make sure they are formatted as text first.

    My problem however is this other program sometimes writes them as "1,1,1" with commas instead of full stops. Don't ask me why this happens. I copy and paste over like normal and use the find replace feature to change the commas to full stops. This is where Excel then decides to change the format back to standard and overwrite all my "1.1.1"s as "01.01.2001". When I then attempt to convert back to text it gives me the 1900 text of that date which is unwanted.

    How do I use find and Replace to change my commas to full stops without Excel reading it as dates? There are format options in the Find and Replace feature but when you use it I see it uses standard first and then converts to text for example. So I will quickly see a flash of "01.01.2001" and then it will turn into the 1900 text.

    Is there a way to Stop Excel reading "1.1.1" as a date and only use "1/1/1" for example?

      • Sorry but as I said this doesn't work as the Find and Replace function overwrites this. Even when I set the desired format with the Find and Replace function I see that it converts with Standard format and overwrites as text afterwards, giving me a date as 1900 text.

          • My process is:

            Format column as text
            Copy BOM into column (formatted with commas "1,1,1")
            Highlight column and Find and Replace all commas with full stops.
            Find and Replace changes these to Dates

            When I click on options in Find and Replace to format as text it formats first to dates and then as 1900 text so I end up with 443829 instead of the "1.1.1" that I want.

  4. Dear Sir,

    I need to keep type in my excel date as 02 AUGUST 2021. Month has to be full block letters (capital letters). please help

  5. Hi, How to change 2-Feb format to 2/2/2010 in excel?

  6. I am trying to edit a document that has the dates listed all in the format of year date month...
    example: 19612404.
    I need the dates to read as 12/04/1961
    Month/Date/ year. Each date month year will be different for the column entries so I am struggling to do a formula for it. Any help thanks

  7. Hi, my excel sheet showing some parts serial number like this 2.40373551027723E+21, it should be a number. i tried to format to number and insert single quote(') in front. but still the same. is there is any way to correct this?

    • Hi!
      When writing a number with more than 15 digits to a cell in an Excel document, the last digits are replaced with zeros. This problem occurs because Excel has a maximum precision of 15 digits. When writing a long number to a cell, the number is rounded to 15 digits and the number is presented in exponential form. You cannot increase the precision of the representation of numbers in Excel.
      Write long numbers like text. When entering the number, precede the number with a single quotation mark.

  8. Bonjour,

    J'aimerais que lorsque de j'écris jj-mm-aa, il me donne automatiquement jj-mmm-aaaa.
    Par exemple si 03-06-20 j'aimerais qu'il me donne 3 Jun 2020.

    Comment faire?

    Merci

  9. I thouted days format was changed ,Tuesday after Thursday, but Wednesday wronged to mention.

  10. Please don't tell me that I only have one solution:

    =DATE(year, month, day)

    =DATE(RIGHT(A1,4),LEFT(A1,2),MID(A1,3,2))

    WRITE in a "SOURCE DATA" column as "text" : 05242021

    My Date column will be identical. Lol.

    If so, let's please tell Microsoft... Um... mmddyyyy is an OK format. :)

  11. Alexander,

    I have searched and done my due diligence to find my answer. Not knowing the answer, I probably am not recognizing that it is in this thread or one of the referenced "Already Answered" threads.

    I like to type the date as mmddyyyy, e.g. 05242021 ... It involves typing 3 fewer symbols... I changed format to mmddyyyy, but that is if I type a date format that Excel recognizes... BUT, I want to type in the mmddyyyy format and have Excel recognize that as a date.

    How? Please. Thank You.

    Cheers, Rick.

    • Found it, I hope! :) Thanks

      Yes, choose the Format Cells command, select Custom from the Category listbox, and type ##"/"##"/"#### into the Type textbox.

      • So, close, yet so far... Not my exact solution... Excel wont quite recognize it as a date!

      • Hi!
        I was unable to replicate your format. However, if this works for you, then you are not recording the date, but the delimited text.

  12. Thank you, cant wait to try it

  13. Hi

    I'm not sure if my request is possible, but I would like to calculate the time difference for a date and time format used within the military. The format used in our Defence Force is 'dd/hh:mm/mmm/yy', displayed/written as '121300Apr21' (24hr). My questions are;
    1. Is it possible for excel to recognise this date/time format, including the month as text?
    2. If so, what formula would I use to calculate the time difference between two dates of this format? Eg - calculate time between 121300May21 and 131730May21

    3. Finally, is it possible for excel to recognise this date and time format displayed in a number of different ways, i.e, with, or without spaces, between the date and time figures from the same spreadsheet list? The list contains dates and times with spaces in following examples;
    a. 12 1300 May 21
    b. 121300 May 21
    c. 12 1300May 21

    Q1&2 are the essential answers I require. Q3, is a nice to have as it will save me time in re-writing a few thousand dates/times already entered. If Q3 is not achievable, then these calculations will be applied from the current date, assuming that Q1&2 are possible.

    Appreciate any assistance, and happy to provide clarity if my questions are confusing - thanks

    • Hello!
      Excel recognizes your data as text. You can convert this text to date and time using this fromula

      =--(LEFT(A1,2)&"-"&MID(A1,7,3)&"-"&RIGHT(A1,2))+TIME(MID(A1,3,2),MID(A1,5,2),0)

      Apply the date and time format you want to this cell.
      You can change this formula to convert any date from Q3.
      You can convert 121300May21 and 131730May21 in two separate cells and then subtract them. Or use one formula

      =--(LEFT(A2,2)&"-"&MID(A2,7,3)&"-"&RIGHT(A2,2))+TIME(MID(A2,3,2),MID(A2,5,2),0) - (--(LEFT(A1,2)&"-"&MID(A1,7,3)&"-"&RIGHT(A1,2))+TIME(MID(A1,3,2),MID(A1,5,2),0))

  14. My problem is here:

    I am used to typing dates as mm-dd-yy

    When I type in a cell 08-12-21, I want it to be (dd-mmm-yy) which is 12-Aug-21

    But what shows up is 8-Dec-21.

    How do I fix this?

  15. 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?????

    • Hello!
      To write a fraction in a cell that has the General format, precede the fraction with zero and a space. For example, to enter 4/10 into a cell, you would type 0 4/10. If you enter 4/10, Excel converts that fraction to a date.

  16. 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

    • Hello!
      I hope you have studied the recommendations in the tutorial above.
      Use custom time format:

      h:mm:ss AM/PM
      hh AM/PM
      h-mm-ss AM/PM

      • Hello thanks for the response. I have another question, can you change the format of time using the example problem above by creating an excel function and not by create custom format?

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

    • Hello!
      Please check out this article to learn how to convert text to date and number to date.
      I can’t give you a more accurate advice since you didn’t specify which date and time format your Windows uses.

  18. 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

  19. 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

    • Hello!
      Unfortunately, the default date and time format in Windows does not use milliseconds. This can be done using a custom format.

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

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

    • Hi Gufron,

      Since format is applied to cells, not values, you also need to set your custom date format to the cells that you copy the dates to.

  22. It's works- well done.
    thanks

  23. Greeting,

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

    Thanks

  24. 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

  25. 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.

    • Hello!
      In the "Replace with" field, write an apostrophe before 2/22. This will show that it is text
      '2/22

      I hope my advice will help you solve your task.

  26. 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

      • 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.

  27. 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.

  28. 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

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

    • First of all... Alexander, you are amazingly patient and kind!

      Abdulla... I like the "05012021" format because it involves no symbols. Is faster to type, in other words. I have learned that the format you have is: mmddyyyy hh:mm:ss and you want to go to: mm/dd/yyyy hh:mm:ss... You go into Format (Ctrl+1), Number Tab>Custom and Type in... Your date ant time you want is the second. Just type it in and hit return...

      My question for Alexander Son of Trifunt ;) is, I entered mmddyyyy and use that as my "date" representation. However, I want to type in a date as mmddyyyy e.g. 05242021 and have it keep that as a date. Rather than typing in 05/24/2021 and having it represent as 05242021... But it says, as I know you will guess because you have probably ALREADY answered this question, "Dates that are negative or too large display as #### etc." I am guessing it has something to do with changing dates as text or numbers. But I am not clear on this...

      Thank You, Rick.

      • Hi,
        If you enter 05242021, the number 5242021 will be written. To write 05242021, you need to enter it as text, put the character ` before the numbers. But that still won't be a date.
        You need to use VBA to solve your problem.

  30. 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

    • Hello!
      In cell A1, write down the date, which is Monday. For example, February 15th. In cell A2, write down the formula

      =IF(WEEKDAY(A1,2)=5,A1+3,A1+2)

      Copy the formula down the column.
      For Tuesday use the formula

      =IF(WEEKDAY(A1,2)=6,A1+3,A1+2)

      Read more about the WEEKDAY function in this article.
      I hope my advice will help you solve your task.

  31. 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.

  32. 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

  33. 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.

  34. 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

    • Hello!
      If all your data is in date format, select the column and set the format you want.
      Pay attention to the following paragraph of the article above — How to change date format in Excel.
      If the date is written as text (for example 14/09/2020 12:54:00 PM), then use the formula

      =--REPLACE(REPLACE(A1,1,2,MID(A1,4,2)),4,2,LEFT(A1,2))

      I hope it’ll be helpful.

  35. 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.

  36. 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?

    • Hello!
      You can use custom date format

      "End-"Mmmm-yy

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

  37. 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?

    • Hello!
      Unfortunately, without seeing your data it is difficult to give you any advice. You can learn more about Convert CSV to Excel in this article on our blog.
      I hope my advice will help you solve your task.

  38. 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

  39. 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.

  40. 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?

  41. 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

  42. 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?

    • Hi,
      The @ symbol specifies where the text entered in the cell should appear.
      Ecample —

      "Income is "@

      I hope it’ll be helpful.

  43. 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?

    • Hello!
      This format is not available in Excel. However, you can convert this date to text and remove the last letter.

      =LEFT(E1,LEN(E1)-1)

      I hope my advice will help you solve your task.

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

    • Hello!
      The information you provided is not enough to understand your case and give you any advice. Please describe your problem in more detail.
      Is your date written in text or in a date format?

  45. Am going to need some help but it’s ok

  46. 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 ?

    • Hello!
      To convert your value to a date, use the formula

      =DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))

      Use custom date format

      yyyy/mm

      Hope this is what you need.

  47. 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

  48. 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.

  49. 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

    • Hello!
      The formula below will do the trick for you:

      =CONCATENATE(TEXT(D2,"mmm")," ",DAY(D2)&LOOKUP(DAY(D2),{1,"st";2,"nd";3,"rd";4,"th";21,"st";22,"nd";23,"rd";24,"th";31,"st"}),", ",TEXT(D2," yyyy, hh:mm AM/PM"))

      Hope this is what you need.

  50. 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!

    • Hello!
      Sorry, it's not quite clear what you are trying to achieve. What is the date in the cell? What format are you using? What result do you want to get?

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 :)