The first part of our tutorial focuses of formatting dates in Excel and explains how to set the default date and time formats, how to change date format in Excel, how to create custom date formatting, and convert your dates to another locale. Continue reading
Comments page 4. Total comments: 936
Hi, I am trying to format date in excel but a hashtag # keeps displaying from the output.
Hi! Specify which date you are trying to format and which format template you are using. Also pay attention to the width of the column. Perhaps the column needs to be wider.
Your articles are excellent – very clear and complete. I find them very useful. In this one the section "How to create a custom Excel date format for another locale" seems to omit a couple of details that interest me. My MSOffice language is UK English and I have a workbook where I want to optionally be able to display everything in German. For cells containing dates I find that, as you say, a format like "[$-407]d mmm yy" displays dates in German. But when dates are displayed in German it is logical to expect to be able to enter them in German too, but I am finding with (Excel 2010, Win10) that Excel does not apply the locale code in the format to input. For example, if I enter "3 okt" Excel does not recognise that as a valid date: it accepts only "3 oct". Is there any way to get Excel to parse input in German, or any other locale than the current MSOffice language? (If conditional formatting can do it, that would be a solution. I'm also competent in VBA.)
A second point you didn't mention is that when my workbook is opened on a French computer the cell format I just mentioned now needs to be "[$-407]j mmm aa". Should Excel notice when a workbook developed on an English computer is being opened on a French one, and convert cell formats automatically? Or should I expect to have to do this myself in a VBA workbook-open event or suchlike?
Hi! If you do not use the standard date formats, but use custom formatting and specify a country code, Excel will not change the code on its own. Also, the date entry format depends only on your computer's local settings.
Hello,
I downloaded an ebay report and want to convert this date/time format: Sep-26-20 20:29:03 PDT to: 09/26/2020
I've eliminated the trailing characters with the =left function and that left me with Sep-26-20 but I cannot get that to convert to 9/26/20. I tried changing the format but that did not correct the format. I would appreciate any tips of help to move this forward. Thanks!
Hi!
Extract the required text strings with the MID and LEFT function. Create a date using the DATE function.
I believe the following formula will help you solve your task:
=DATE(20&MID(A1,8,2),MONTH(DATEVALUE(1&LEFT(A1,3))),MID(A1,5,2))
Absolutely brilliant. Thank you!
Thank You
Hi. I want to change my this date format 31/10/2022 12:49 AM to 2022-10-31T00:49:00 this format in excel how can I do it? Help me find this out.
Thanks in advance.
I want to change my date from 3/27/2023 to 03/23/2023 the date is on left hand side instead of right hand side.
Have read the article more than twice and tried all the suggestions but non work for what I want.
Please kindly help.
Hi! Try this date format: mm/dd/yyyy
Hi!
All the information you need for your task is in the article above. Here is the date format for you:
yyyy-mm-ddThh:mm:ss
But what I am trying to ask is this is the format in my first column 31/10/2022 12:49 AM (Assume column as A2).
I want the next column to be linked with before column(which is A2) as get output as 2022-10-31T00:49:00.
To understand what the date and time format is, read the article above carefully. I also recommend that you read this manual: Time formatting in Excel: 12/24 hour, custom, default.
I'll see but can u share formula for the present one which I mentioned above?
how to change number format to Date format Ex: 20230207 to07/03/2023
Hi!
Here is answer to the same question.
Hi,
I changed the date locale to German so the date I enter displays in the German format d/m/y. However, I still have to enter the date in the US way m/d/y.
How can I change the cell so that I can enter the date in the German way?
Hi!
Follow the instructions in this paragraph above: How to change the default date and time formats in Excel.
Hi Alex, I have this problem:
A list with some dates in this format mm/dd/yyyy, others like this mm/yyyy, and others only like this yyyy. The first two excel can handle fine, but the yyyy can't, for example, I have 2022 and excel transform to 7/14/1905, but I neet to transform into 01/01/yyyy if no, I can't sort by oldest or newest.
Do you know any solution to this?
I have thousands of date data, some are aligned to right hand side as date, while others aren't and are at left side.
The one on the left are in m/dd/yyy as against mm/dd/yyy.
Have formated the cells, value which gives me #VALUE! , date and date value as #Value!.
Please kindly help on how to make all my date mm/dd/yyy and to be on right hand side.
Thanks.
I
Hi! If the date is left-aligned, then it is text, not date. Use this guide: How to convert text to date in Excel.
Hello!
You can convert the year number to a date using the DATE function. See here for more information: DATE function with formula examples to calculate dates.
For example,
=DATE(A1,1,1)
I want to change date format from 04/26/2018 to 26/04/2018. I tried using all custom options but there is no change, please suggest some formula for the same
Hi!
Custom date format dd/mm/yyyy. Please read the above article carefully.
how do I change a date format from 04.02.2023 to 04/02/2023 in a sales converter in excel?
Hi!
I kindly ask you to have a closer look at the article above. Have you tried the ways described in this blog post?
I have date in format dd/mm/yyyy… i want to change format as mm-dd-yyyy
Please re-check the article above since it covers your case.
I cannot change region settings in my PC to perform such activity for date format as its locked our company,, appreciate if you can tell me if there is alternates solution in excel sheet itself
Hi!
You can make custom regional settings in date format. See these recommendations: How to create a custom Excel date format for another locale. I hope it’ll be helpful.
=TEXT(A6, "MM-DD-YYYY")
Got solution
Thank u
Hi Alex!
Thanks for this detailed and helpful post about time format customization...
I am looking for a custom formating which, when I enter a decimal number, just show it as time.
Want to change decimal point (.) to colon ( : )
For example if I enter 11.39, I want it to show in cell as 11:39.
Is it possible???
Hi!
The decimal point is the Windows system separator and cannot be replaced in a custom user format.
hello i would like to ask. in my excel, the date is put as General format. example: 202302 which stands for 2023/02. so how can i format it to 2023/02 since i need to calculate the remaining months between 202302 and 202501 as well. hence i would like to ask on answer for this. thanks a lot!
Hi!
The following tutorial should help: How to convert text to date and number to date in Excel.
Try this formula:
=DATE(LEFT(A1,4),RIGHT(A1,2),1)
To calculate the difference between dates in months, use these instructions and examples: DATEDIF function to get difference between two dates.
DATEDIF(DATE(LEFT(A1,4),RIGHT(A1,2),1),DATE(LEFT(B1,4),RIGHT(B1,2),1),"m")
Hi,
My excel won't do any format of the date I have entered.
I entered 01-2022 and want to format to jan-22, but nothing happened. Also tried other formats, still didn't change at all. It used to do it correctly, but now nothing happened.
How can I fix this?
Hi!
Remember how you changed the date format before and use the recommendations from the article above.
Thank you, this was helpful!
Is there a way to change the how the date displays based on the value of the cell? I haven't seen this option in conditional formatting. What I want to do is display all dates in months except for May, June, and July as mmm. d (ex. Jan. 1, Feb. 7, Dec. 31, etc) and then the May, June, and July dates to be spelled out without a period (May 31, June 6, July 16). Is there a way to do this directly in the cell so I can just enter it as 6/1/22 and it get formatted as June 1 or (in the same cell) enter it as 8/31/22 and it get formatted to Aug. 31?
I figure I could use a helper column with an if function maybe, but it would be better if I could get the settings to work directly. Thanks!
Hi!
Use the MONTH function in a conditional formatting formula to determine the month number. For example
=MONTH(A1)=6
You can also find useful information in this article: Excel conditional formatting for dates & time.
I am trying to extract time from a text in cell A1 for example
(Cell A1) Smith, John Lunch 03:02 (where 03:02 is 3 mins and 2 secs and the output should be 00:03:02) . Appreciate your help.
I want to change datetime format to Date format like 30 May 2022 11:15:00:000 to 30-05-2022. How i can achieve this? Experts input pls. Thanks in advance.
Hi!
How to change the date format is described in detail in the article above. If the date is written as text, use these guidelines: How to convert text to date in Excel. Here is an example formula:
=DATEVALUE(LEFT(D1,11))
You can parse more than 500 combinations representing dates in text format and convert them to regular excel dates with Convert Text to Date tool.
Is there a way to change the day hours?
I want to define a day between 10:00 - 18:00 to calculate the working hours correctly.
How can I apply this change to Excel?
Hi Alexander,
I actually couldnt find the following problem any where if i try to look it up.
I am trying to format the cells to change an input of (for example) 11 to 11:00.
But when i set the cellformat to -Time- it changes the value to 11-01-1900 00:00:00.
Even when using custom formatting to (hh:mm) it still converts the 11 into a date and time.
Is there a way where i can input an absolute number ranging from 0 to 72 and have excel convert is to a hh:mm format?
Thanks a million.
Hi!
Such conversion when entering a number is possible using VBA. You can also use an input mask.
Hi Alexander,
I am getting error value with DATEVALUE(06/12/2022). Can you please suggest me.
Thanks
Hi!
The DATEVALUE function works with text. Use quotation marks. DATEVALUE("06/12/2022") See detailed instructions here: How to convert text to date and number to date in Excel.
How do I change this format mmddyyy to this format ddmmyyyy?
Hi!
All the necessary information is in the article above.
I want to change this format 02.11.2022
into 2022-11-02
=DTAE(RIGHT(A1,4),MID(A1,4,2),LEFT(A1,2))
Dear Team
How can I convert following time format through a formula 3 hr. 21 min. into 3:21 format.
Thanks in advance
Hi!
In your data, the time is written as text. Extract numbers from text as described in this tutorial: Excel substring functions to extract text from cell.
Use the TIMEVALUE function to convert text to time.
For example:
=TIMEVALUE(LEFT(A2,2)&":" & MID(A2,SEARCH(" ",A2,5),3))
IT IS WORKING VERY WELL,
THANKS A LOT
Hi guys, is it possible to change date and time format to days?
e.g.
from:
25/10/2022 0:00
to:
Day 1
and
from:
26/10/2022 0:00
to:
Day 2
Thanks
Hi!
You can only get these values using a formula if you use this instruction: Calculate number of days between two dates in Excel.
="Day "&A1-DATE(2022,10,24)
Hey Alexander! Thank you for all the nice reply for people! I am Sure you do a lot of good!
I have a problem when trying to import CSV into excel as numbers that are displayed is not the same as in the console. This is an issue as I need the number-value, but the console shows a long-date with clock aswell.
For an example:
Value: Console:
880 is 05/02/1900 16.00.00
1077 is 13/02/1900 21.00.00
1104 is 15/02/1900 00.00.00
2000 is 23/03/1900 08.00.00
Etc. Etc.
I want to get the values and stop it from avoiding giving me what's in the console. What is the issue here excactly and how do I bypass this? I tried with a xlookup, datevalue and so forth, but nothing works! It is like the numbers printed are belived to be long-date format with time. I need the Value-data as shown above, and I need some kind of formular who can convert the console-values displayed to the right above, to the values displayed to the left above.
Appreciate your help!
Hello!
Unfortunately, I cannot understand how you get such values and what console you are talking about. These dates cannot be these numbers in the Excel system. Maybe this article will be helpful: How to convert (open or import) CSV file to Excel. Or explain the problem in more detail.
How about converting this date format (when pasting from another spreadsheet) - 2022-04-13 09:58:14
I would like it to simply be short date mm/dd/yyyy, no matter how I format the cells before I paste, I always get this silly format. I don't want to have to use text to columns every time. Is it possible? It is this format in like 3 columns worth of data for all my lines. I need to be able to update this report swiftly.
Hi!
I can assume that when you insert data from another table, you get not a date, but a text. Try to use these recommendations: How to convert text to date in Excel.
Dear sir
convert date format from 29/07/1979 to date format 10.11.2021
Hi!
Please re-check the article above since it covers your task.
Hi Sir,
Need your help to provide me a formula to change below date & time which is combined as number
20220804090848 (yyyymmddHHmmss)
I need it as, dd/mm/yyyy HH:mm:ss
Thanks.
Hi!
To convert your digits to date and time, I recommend using the article: How to convert text to date and number to date in Excel.
You can use this formula:
=DATE(LEFT(A1,4), MID(A1,5,2), MID(A1,7,2)) + TIME(MID(A1,9,2), MID(A1,11,2), MID(A1,13,2))
how to change whole culom with 22/09/2022 00:00 to 09/09/2022 in excel please?
Hi!
If you want to exclude seconds from the date format, change the format as described in the article above. If you want to subtract 13 days, use these recommendations: Subtract dates in Excel; add days, weeks, months or years to date.
Hi i have text format like this 2007-May-24 00:00:0000. How can i convert this into date and time format as this 24-05-07 00:00 ? Please help
Hi!
Extract the desired strings from the text using the substring functions.
Create a date using the DATE function.
=DATE(LEFT(A1,4),MONTH(1&MID(A1,6,3)),MID(A1,10,2))
Set the cell to a custom date and time format.
Hi! Newer to excel and need help to save time please!
In one column I've entered times (about 500+rows) like this: 2105 (as in 21:05). Unfortunately, at the time creating the sheet, I did not have the knowledge or wherewithal to change the format of the column to the 24 hr format (hh:mm) and I only kept it in plain number format. So, my problem is I don't want to go and correct all 500+ entries individually. Is there a formula I can use to switch 2105 to 21:05 (plain number format to time format)?? Please? Help?
Hello!
Use the substring functions to add a time separator ":" between the numbers. Use the TIMEVALUE function to convert text to time.
The formula below will do the trick for you:
=TIMEVALUE(LEFT(A1,LEN(A1)-2)&":"&MID(A1,LEN(A1)-1,2))
Thank you!
Hi, I have a CSV file containing a column with IDs formatted as [1-1-1234] but Excel keeps changing it to the date format [m/d/yyyy]. I'm not able to import my data unless they're done with the dashes (-).
I've done the custom format to change it to [m-d-yyyy] but since it's a CSV file it doesn't save the formatting. Is there a way to change/create the default date format to have dashes (-) instead of slashes (/)?
Thank you!
Hello!
Pay attention to the following paragraph of the article above – How to change the default date and time formats in Excel. Change the date format as you need in the Region and Language panel.
22//06//2022 10:52 PM
I want change the format of Above like 22//06//2022 21:52
Hi!
Please re-check the article above since it covers your case. Remove from time format symbols AM/PM. You can learn more about time format in Excel in this article on our blog.
I looked through all of your examples several times so I am sorry if I missed the answer to my question....I am trying to change the date to 09-07-2001 from 09/07/2001. I need the mm-dd-yyyy format created but everything I am finding puts it dd/mm/yyyy
Thanks for your help
Hi!
Pay attention to the following paragraph of the article above - Creating a custom date format in Excel. Write the date format you want in the Type box.
I am trying to convert these numbers 154975.4857, & 145454.2432 from a csv file to minutes and seconds.
Hi!
I can't guess what your number means - hours, minutes, or seconds. The following tutorial should help: How to convert time to decimal number, hours, minutes or seconds. If this is not what you wanted, please describe the problem in more detail.
I have date written in the format 20181019 and i need to re-write them using slash, that is 2018/10/19.
Approximately there are 20k of these dates i need to change. How can i do this. Thanks
Hello!
The answer to your question can be found in this article: How to convert 8-digit number to date in Excel. I hope this will help.
Hii
I have multiple dates like 15/03/2020 in a SINGLE CELL but i want to change the date format as 2020-03-15
Note:- in a single cell multiple dates to be change!!
Hi!
If several dates are written in one cell, then this is text, not dates. You cannot change their format using formatting.
Hi, I've got exported data into excel and unfortunately they have the date in this text format "May 17, 2022" in the D column, and while I've been through the comments I can't find anything that converts this into a date. What would you recommend?
Thanks
Hello!
Use substring functions to extract numbers from text. Convert it to date using DATE function.
=DATE(RIGHT(D1,4),MONTH(1&LEFT(D1,3)),MID(D1,5,2))
I hope my advice will help you solve your task.
Thank you for replying. Unfortunately this returns a #VALUE
Hi!
Perhaps the problem is in the regional settings of your Windows. Try this formula
=DATE(RIGHT(D1,4),VLOOKUP(LEFT(D1,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(D1,5,2))
You can also analyze more than 500 combinations representing dates in text format and convert them to regular Excel dates using Convert Text to Date tool. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
Hi there,
I have hundreds of dates in a column. In this column, some dates are dd/mm/yyyy and some are mm/dd/yyyy. I am from New Zealand and require the dd/mm/yyyy format. I have tried to change the format settings of the entire column to do this.
At first, some rows were set as Armenian, and some set as English. After setting them all to English, the problem is still happening. I tried to read through most of your advice and comment replies but I got a wee bit confused and thought it best to just ask!
Hello!
Some of your dates are written as text. This text should be converted to a date. Set the cells to the desired date format and use the formula:
=IF(ISTEXT(A1),DATE(RIGHT(A1,4),LEFT(A1,SEARCH("/",A1)-1),MID(A1,SEARCH("/",A1)+1,SEARCH("/",A1,4)-SEARCH("/",A1)-1)),A1)
I recommend reading this guide: How to convert text to date in Excel
My hundreds of dates are entered with an abbreviation at the end of the day i.e. 22nd March 2022 and it hasn't accepted any of the normal ways of changing the format to 22/03/2022 - I know the 'nd' is causing the problem but can't figure my way around it - any help?
Hello!
Remove extra characters from text and convert to date using DATEVALUE function:
=DATEVALUE(LEFT(A1,SEARCH(" ",A1)-3)&MID(A1,SEARCH(" ",A1),30))
Set the date format you need in the cell as described in the article above.
Thank you SOOOOO MUCH it worked a treat and has saved me so much time :)
Difference between two dates with time to collect time difference between two dates for example Wed Apr 20 17:56:16 IST 2022 & Wed Apr 20 17:53:43 IST 2022 Please give answer with formula not manually because I have 30000 entries for work. Please help if any
Hello!
You can find the examples and detailed instructions here: Excel DATEDIF - calculate difference between two dates in days, weeks, months or years.
I hope my advice will help you solve your task.
Excel stopped recognizing the Spanish date formats, it was working from January til March then it just stopped working during April.
Example:
Using VLOOKUP and 01 abr. as a reference, it doesn't count "01 abr" from the raw data.
This worked from Jan to Mar using the same "everything". I just changed the month.
Hello!
The date format does not affect its value. What formula are you using?
"abr" or "apr"?
Insanely simple, thank you
I want to input 20032022 then excel will convert it to 20-Mar-2022. what is the custom format for that?
Hello!
You can find the examples and detailed instructions here: How to convert 8-digit number to date in Excel.
This should solve your task.
how can Jan-2021 be read as January 2021 instead of being a text
Hi!
If I understand you correctly, use a custom date format as described in the article above -
mmmm yyyy
how to change 02.01.2022 to 02/01/2022?
Hi!
Use a custom date format as described in the article above.
dd/mm/yyyy
Monday, February 21, 2022
CONVERT IN 02-21-2022
FORMULA USING TEXT(RIGHT(N1044,LEN(N1044)-FIND(",",N1044)-1),"mm-dd-yyyy")
BUT AFTER RESULT February 21, 2022
I NEED CONVERT IN 02-21-2022
Hi!
We have a ready-made solution for your task. Our Text to Date tool allows you to convert text to normal Excel dates.
I have date in format Feb-21, Mar-21 & so on till Jan-22. While converting this to year I am not able to do that, I am using formula Year it shows me a result 2022 for 2021 as well. Also, I am not able to convert it to date. Please help.
Hello!
Look closely at what date format is set in the cell. To do this, press CTRL+1. I think your date format is "mmm-dd".
Feb-21 means 21 February 2022.
Hi, I use mmmm or dddd and I get always fmonth or day names in small letters, but I would like that first letter is big just like Thursday but i get thursday. I use estonian language and may bet that is reason why all letters.
Hello!
Pay attention to what custom date format is set in this cell. If there is something like
[$-F419]dddd, d mmmm yyyy
then delete the regional settings [$-F419].
I hope it’ll be helpful. If something is still unclear, please feel free to ask.
Hello! and thank you for your replay but my problem are that all months and days of the week are in lower case (small letter). I put 1.04.2022 and Format Cells>NUmber>Custom I put mmmm because I would like to see only month or some other place weekday and result always I get april or monday not what i want April or Monday . I would like to see that first letter is big /upper. If I use formula =upper(a1) then all letters will be APRIL but I want that first letter is only upper
Hi!
I can't repeat your problem as it is related to the regional settings of your computer and your Excel. Try to use PROPER function to capitalize the first letter.
That formula and 1.04.2022 will be Aprill
=UPPER(LEFT(TEXT(A1;"mmmm");1))&""&LOWER(RIGHT(TEXT(A1;"mmmm");LEN(TEXT(A1;"mmmm"))-1))
but is there a simpler method