Converting text to date but 29 feb won't show, instead it shows 1 Mar

avk5021

New Member
Joined
Oct 19, 2016
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Hi, I have date data that are texts and I have to convert them into dates. All other days are okay except this year which has 29 Feb. The formula I'm using to convert text to date is =DATE(RIGHT([@day],4),MID([@day],4,2),LEFT([@day],2)).
If someone can help me out would be much appreciated!
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Perhaps you could also show us the text value that you are starting with? .. or even 3 or 4 examples
 
Upvote 0
01/03/2567
28/02/2567
28/02/2567
28/02/2567
29/02/2567
01/03/2567
My date data is in Thai at first. I would use the formula mentioned to convert them into date format, then use =DATE(YEAR([@[TH date]])-543,MONTH([@[TH date]]),DAY([@[TH date]])) to convert them into English date.
 
Upvote 0
I would use the formula mentioned to convert them into date format, then use
The issue with that is if you are initially converting the text date to a numerical date using the DATE function, the year (2567) is not a leap year so Feb 29 does not exist and that is why you are getting 1 March.
I don't know much about Thai dates but does this work directly on your text values?
Excel Formula:
=DATE(RIGHT([@Day],4)-543,MID([@Day],4,2),LEFT([@Day],2))
 
Upvote 0
Solution
It does! Thanks a lot Peter! You've been helping me a lot. If you ever coming to Chiang Mai, Thailand do let me know. I wanna treat you a good meal.
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

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