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.
-
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.
-
Help Article Resources
Categories
Check out the Formula Handbook template!