Formula to get all dates in dd-mm-yyyy

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
Hello formula experts
I have a data received in which the date format is like in the column A. I want to get the all the dates correct in the format dd-mm-yyyy in the adjacent column with the help of a formula. I tried the value formula but half the dates are showing value error because of the different formats of the dates. Half of the dates which are showing error, the year can't be viewed in the formula bar. I need your expert advise to get the dates.
Get date format.xlsx
ABC
1DateCorrect Date FormatExpected Result
29 Apr 202009-04-202009-04-2020
39 Apr 202009-04-202009-04-2020
49 Apr 202009-04-202009-04-2020
510 Apr 2020#VALUE!10-04-2020
610 Apr 2020#VALUE!10-04-2020
710 Apr 2020#VALUE!10-04-2020
810 Apr 2020#VALUE!10-04-2020
910 Apr 2020#VALUE!10-04-2020
1031 Mar 2021#VALUE!31-03-2021
1131 Mar 2021#VALUE!31-03-2021
1231 Mar 2021#VALUE!31-03-2021
Get date format
Cell Formulas
RangeFormula
B2:B12B2=VALUE(A2)
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Upvote 0
Solution
Wow! solved in one shot. Thanks Peter SSs.
Can you please tell me how did it take the year 2020 and 2021 and from where...?
You can't view the year in the formula bar but can be viewed in the cell.
 
Upvote 0
You can't view the year in the formula bar
You can if you
- expand the formula bar like below
1656417542827.png


or if your formula bar is only one row high, click in it and then press the down arrow

1656417616129.png

-
 
Upvote 0
You can if you
- expand the formula bar like below
View attachment 68104

or if your formula bar is only one row high, click in it and then press the down arrow

View attachment 68105
-
Ah. Yes I noticed it now after you told me. If I want to view all the dates with one extra character then I have to expand the formula bar. But what I couldn't understand is that if the whole date is entered in the cell, why is it not taking the value of the date by the value formula.
 
Upvote 0
I thought maybe they have pressed Alt+ Enter while entering the date
 
Upvote 0
Anyways, Thanks once again Peter SSs.
 
Upvote 0
I thought maybe they have pressed Alt+ Enter while entering the date
Yes, that is correct if the dates were manually entered. Just the same, Alt+Enter is not acceptable as a day/month/year separator in Excel.
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top