Change text format to date
The format that I have is :21/Jan/2020
This formula does not help: DATE(VALUE(RIGHT(text,4)), VALUE(MID(text,4,3)),VALUE(LEFT(text,2)))
Does anybody have a suggestion?
Best Answers
-
You would need to convert the "Jan" to a number.
IF(MID(text,4,3) = "Jan", 1, IF(MID(text,4,3) = "Feb", 2, IF(MID(text,4,3) = "Mar", 3, ..............................................................., 12)))))))))))
Then drop that into the VALUE function within the month section.
DATE(VALUE(RIGHT(text,4)), VALUE(IF(MID(text,4,3) = "Jan", 1, IF(MID(text,4,3) = "Feb", 2, IF(MID(text,4,3) = "Mar", 3, ..............................................................., 12)))))))))))),VALUE(LEFT(text,2)))
-
Thank you Paul.
-
Happy to help. 👍️
Answers
-
You would need to convert the "Jan" to a number.
IF(MID(text,4,3) = "Jan", 1, IF(MID(text,4,3) = "Feb", 2, IF(MID(text,4,3) = "Mar", 3, ..............................................................., 12)))))))))))
Then drop that into the VALUE function within the month section.
DATE(VALUE(RIGHT(text,4)), VALUE(IF(MID(text,4,3) = "Jan", 1, IF(MID(text,4,3) = "Feb", 2, IF(MID(text,4,3) = "Mar", 3, ..............................................................., 12)))))))))))),VALUE(LEFT(text,2)))
-
Thank you Paul.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 85 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!