Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

DATETIME_FORMAT with multiple date fields

Topic Labels: Formulas
Solved
Jump to Solution
357 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello everyone !

I have records with multiples Date fields (4 fields to be exactly). So we have {date field 1},{date field 2},{date field 3} and {date field 4}.
I would like to have a formula field that shows only the year of one of these date field. Something like "If {date field 1} has no date, check {date field 2}. If not, check {date field 3}. If not, {date field 4}. If not, keep the cell empty.

I tried some of formulas, without sucess.

Thank you so much for your help!

Quentin

1 Solution

Accepted Solutions

After somes researches and tests, I’ve got a formula that works.

IF({Date 1}=BLANK(),IF({Date 2}=BLANK(),IF({Date 3}=BLANK(),IF({Date 4}=BLANK()," ",DATETIME_FORMAT({Date 4},'YYYY')),DATETIME_FORMAT({Date 3},'YYYY')),DATETIME_FORMAT({Date 2},'YYYY')),DATETIME_FORMAT({Date 1},'YYYY'))

Thank you !

Quentin

See Solution in Thread

1 Reply 1

After somes researches and tests, I’ve got a formula that works.

IF({Date 1}=BLANK(),IF({Date 2}=BLANK(),IF({Date 3}=BLANK(),IF({Date 4}=BLANK()," ",DATETIME_FORMAT({Date 4},'YYYY')),DATETIME_FORMAT({Date 3},'YYYY')),DATETIME_FORMAT({Date 2},'YYYY')),DATETIME_FORMAT({Date 1},'YYYY'))

Thank you !

Quentin