Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
vkal12
Creator
Creator

Merge two date columns into one date column

Hello everyone,

I have the following problem: my table contains a column "Type" that contains values A, B or C. Values A or B always have their date in column "date1", value C always has the date in column "date2". 

vkal12_0-1675255690577.png

I want to combine those two date fields to create a new column "new date" that contains the values of both columns. 

I used the following formula to create a new column but it does not seem to work: =If(Type='A' or Type='B', date1, date2). With this formula it only shows date1 in my new column but the values for date2 are null.

Can anyone help me? 

 

Thank you very much!

 

Labels (3)
1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

alt(date#( date1 , 'YYYY-MM-DD' ),date#( date2 , 'YYYY-MM-DD' ) as "New Date"

View solution in original post

2 Replies
ogster1974
Partner - Master II
Partner - Master II

alt(date#( date1 , 'YYYY-MM-DD' ),date#( date2 , 'YYYY-MM-DD' ) as "New Date"

vkal12
Creator
Creator
Author

Thanks Ogster1974, that works perfectly!