Help

Re: Convert Text based date to Date field

Solved
Jump to Solution
1840 1
cancel
Showing results for 
Search instead for 
Did you mean: 
micha281sth
6 - Interface Innovator
6 - Interface Innovator

Hello,

I am having a table in Airtable that contains a text field with dates. I imported a CSV files. And all dates were added as text field in a wrong format (MM/DD/YY). 

So I am basically looking for a way to: 

  1. Convert these text date field to a real date field that is next to the column (so Column 1 with the text based date value should be copied to Column 2 with a date field)
  2. And in another column I want to change the date format (also text based) from MM/DD/YY to DD/MM/YYYY.

How can I do this? 

Thanks for help, 
M.

1 Solution

Accepted Solutions
micha281sth
6 - Interface Innovator
6 - Interface Innovator

Solved it: 

IF({Name of Text Date Field}, DATETIME_FORMAT({Name of Text Date Field}, "DD.MM.YYYY"), "")

See Solution in Thread

3 Replies 3
micha281sth
6 - Interface Innovator
6 - Interface Innovator

I figured it out by adding a formula field and: 
DATETIME_PARSE({Name of Text Date Field}, 'MM/D/YY')

But the problem is that some cells don't have a text based date and in output of the formula field there will be #ERROR!. 

How can I run the formula only if there is a value available in the text based date field? Is there something like a "IF…" command?

micha281sth
6 - Interface Innovator
6 - Interface Innovator

Solved it: 

IF({Name of Text Date Field}, DATETIME_FORMAT({Name of Text Date Field}, "DD.MM.YYYY"), "")
Operations_Comm
4 - Data Explorer
4 - Data Explorer

What if you'd like to include the time? I have the same issue and i'd like to keep the time that was imported after the date in the same cell.