# Notion Answers

Help between Notion users

It's free & easy

### Get answers

Answers, votes & comments

### Vote and select answers

Receive points, vote and give the solution

2votes

# Timestamp formula does not work unless both columns have an entry.

Hello,
I have a formula that pulls out the max date(the last date) from two columns, however the formula does not work unless both columns have an entry. I still need the formula to work if one of the columns has a date. What can I add to make this work?
I appreciate any help you can provide.

Current formula:

``fromTimestamp(max(timestamp(prop("Column A")), timestamp(prop("Column B"))))``

## 1 Answer

1vote

polle Points83460

You need to extend the arguments to compare everything.

I am using Date 1 & 2 for the Notion columns, so modify them as needed.

``if(empty(prop("Date 1")), prop("Date 2"), if(empty(prop("Date 2")), prop("Date 1"), fromTimestamp(max(timestamp(prop("Date 1")), timestamp(prop("Date 2"))))))``

Here it is how the Notion formula works.

If Date 1 is empty, show Date 2, if Date 2 is empty, show Date 1, otherwise use the fromTimestamp formula.

Hope that helps.

2votes

### Dennismel12 commented Oct 19, 2022

I genuinely mean this: You're my hero. Thank you so much. It worked perfectly.

1vote

### polle commented Oct 19, 2022

Glad to help :)

If you consider it solved, please select the answer to mark this question as solved.

## Please log in or register to answer this question.

### Recent Activities

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!