[Solved] Subtracting Date fields
Posted: Wed May 12, 2021 8:33 am
Hi, I'm a newbie, but can't find an answer to this question in Help or on the forum. I've created a database with 10 fields. I'll be entering data directly and don't need to use a form. I want to add/subtract one date field from another to generate a 'days between' number. In my Basefile, I will be entering a 'start date' and would like Base to automatically calculate and enter the 'end date' into an 'end date' field.
Example, Field Name is 'Invoice Date' which I enter manually. Another field is 'Payment Due Date' which I want Base to calculate as 'Invoice Date' + 10
In Calc, if I manually enter a date in cell B2 (the invoice date), then I could put the following formula in cell C2: +B2+10 and the output would be 10 days later than the date in B2.
My assumption is I would need to enter a 'default value' formula in the 'Payment Due Date' under Field Properties to do the calculation, but I can't figure out how to indicate the reference field/cell 'Invoice Date.'
Thank you in advance for your help
Example, Field Name is 'Invoice Date' which I enter manually. Another field is 'Payment Due Date' which I want Base to calculate as 'Invoice Date' + 10
In Calc, if I manually enter a date in cell B2 (the invoice date), then I could put the following formula in cell C2: +B2+10 and the output would be 10 days later than the date in B2.
My assumption is I would need to enter a 'default value' formula in the 'Payment Due Date' under Field Properties to do the calculation, but I can't figure out how to indicate the reference field/cell 'Invoice Date.'
Thank you in advance for your help