Apr 19, 2023 02:29 PM
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?
Apr 19, 2023 10:42 PM
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())
Apr 20, 2023 04:31 AM
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