Hi, im using Airtable to calculate invoice dated from when a client signs up depending on payment method and type. I have a start date, and i have a last invoice date and next invoice date. And im using a formula now to calculate next invoice date based on last invoice date. But if the last invoice date is empty i get an error. What i want to happen is that if there is no last invoice date, it should instead be start date.
Here is my current working formula:
DATETIME_FORMAT(DATEADD({Last Invoice Date},IF({Payment Method}="Quarter",90,IF({Payment Method}="Partner",360,30)),'day'),'YYYY-MM-DD')
And as i said, if {Last Invoice Date} is empty i get an #error. My manual solution now is to just enter the start date manually in the last invoice field.
What i want to do is to base the first invoice date on the start date, if the last invoice field is empty. and i tried this.
IF
({Last Invoice Date} = BLANK(
(DATETIME_FORMAT
(DATEADD
({Start},30)
),'day'
),'YYYY-MM-DD'),
(DATETIME_FORMAT
(DATEADD
({Last Invoice Date},
IF
({Payment Method}="Quarter",90,
IF
({Payment Method}="Partner",360,30
)
),'day'
),'YYYY-MM-DD'
)
)
)
