Converting a date in a text type to Date type

Hi, I have a column as text/number type with date value such as '2023-06-27 09:02:53' and I want to have another column and convert it to DATE column type.

e.g "Date as Text Type" column is a text/number field. I want to convert this to DATE and put in the "Date as DateType" column.

is there a way to do it?

Best Answer

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    Answer ✓

    You will need to make sure your [Date as DateType] column is formatted as Date. This also assumes your [Date as Text Type] column is always in the same format. (Starts with full 10 digit date)

    =IF([Date as Text Type]@row <> "", DATE(VALUE(LEFT([Date as Text Type]@row, 4)), VALUE(MID([Date as Text Type]@row, 6, 2)), VALUE(MID([Date as Text Type]@row, 9, 2))), "")

Answers