Help

Re: calculate the days remaining between today and month end

1308 0
cancel
Showing results for 
Search instead for 
Did you mean: 
hesterrr
4 - Data Explorer
4 - Data Explorer

I am quite new to airtable, i am trying to create a formula that says if an end date exists THEN subtract today's date from the end date column ELSE calculate days remaining in the month.

I have checked through various date formulas on the community and i do not find a fomrula that directly calculates days remaining between today and month end if there is no value in the field 'end date'.

Can someone help please?

2 Replies 2
Jason_Hill
6 - Interface Innovator
6 - Interface Innovator

This will get you close but it is not a complete winner. Airtable does not recognize the EOMONTH function, so I can't figure out how to calculate to the end of the current month. It counts backward and then forwards depending on your {end date} and the current date.

IF({End Date}, DATETIME_DIFF({End Date}, TODAY(), 'days'), (DATETIME_FORMAT(DATEADD(TODAY(), 1, 'month'), 'YYYY-MM') & "-01") - TODAY())

Thank you @Jason_Hill 
the formula worked for calculating the remaining number of days from today to the end date but did not calculate the days remaining till the end of the month.

I have managed to find a way around getting my answer, although it took series of formulas to finally arrive there.
Thank you @Jason_Hill again for helping out