How to convert to a date

Options

HI all,

I'm trying to get a text string from one column (lot code) converted into a date in another column. The first column contains numbers such as: 202405 Ideally the date column would read the first four digits as a year, and the last two as the month (all of the days can be the first). So far I have:

=DATE(LEFT([LOT CODE]@row, 4), RIGHT([LOT CODE]@row, 2), 01) but it keeps throwing an "invalid data type" error. I've used =istext() to check the data type of =LEFT([LOT CODE]@row, 4) and it confirms it is text. I assumed this would be a fairly straight forward task, but I can't seem to get it to cooperate. Maybe I'm missing something obvious

Any help is much appreciated

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!