Convert Text to Date Format
I am trying to copy a text column written out as "Thursday 07/29/2021" into another cell with a date format "07/29/21" in order to use that cell as a reference. I have tried the VALUE formula but have not been able to get it to work...
Thanks for you help!
Best Answers
-
Hey @JJLewis
Try this. The FIND function returns the starting position (a number) of whatever it is looking for, in this case a "/". The formula uses the number it finds as a starting position in the text string. The DATE function requires a syntax of DATE(YYYY, MM, DD)
=DATE(VALUE(RIGHT([your text column]@row, 4)), VALUE(MID([your text column]@row, FIND("/", [your text column]@row) - 2, 2)), VALUE(MID([your text column]@row, FIND("/", [your text column]@row) + 1, 2)))
-
Thank you! That did the trick...
Answers
-
Hey @JJLewis
Try this. The FIND function returns the starting position (a number) of whatever it is looking for, in this case a "/". The formula uses the number it finds as a starting position in the text string. The DATE function requires a syntax of DATE(YYYY, MM, DD)
=DATE(VALUE(RIGHT([your text column]@row, 4)), VALUE(MID([your text column]@row, FIND("/", [your text column]@row) - 2, 2)), VALUE(MID([your text column]@row, FIND("/", [your text column]@row) + 1, 2)))
-
Thank you! That did the trick...
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!