Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › Date calculation
- This topic has 5 replies, 3 voices, and was last updated 4 years, 6 months ago by Francis.
-
AuthorPosts
-
March 30, 2018 at 7:13 AM #28015
Nigel ParrishParticipantHi
I am getting myself in a right muddle even after reading through some threads but I think I want a date subtract formula.
I want to calculate the due date on invoices 12 weeks 16 weeks and a custom number of weeks from a given date in the future.
I would like the ‘Payment Due Date’ to be calculated from the ‘course date’ and then a date to send the invoice to be 14 days before the due date
For example I have a course booking for 1 August course [Enter course 1 date Date] and would like a calculation date 84 days before that date [Payment Due Date] and another 14 (any number) [invoice terms] days before payment due date [Send invoice date].
Hope that makes sense – trying to get a bit more automation to my invoices.
Nigel
March 30, 2018 at 10:45 AM #28016
BrendanKeymasterHi Nigel,
There’s a DATEADD() function in Tap Forms 5 which will do exactly what you want.
DATEADD(Date;Y;M;W;D;H;M;S)
For example:
DATEADD(Date;0;3;0;2;0;0;0)
will add 3 months and 2 days to the specified date. Y = Years, M = Months, W = Weeks, D = Days, H = Hours, M = Minutes, S = Seconds.It returns a Date value, so make sure you set the Result Type to Date.
You can use negative numbers too, so you calculate a Payment Due Date by putting -84 into the D spot in the parameter list.
E.g.
DATEADD(Course 1 Date;0;0;0;-84;0;0;0)
For the weeks, just use the W parameter:
E.g.
DATEADD(Invoice Date;0;0;14;0;0;0;0)
If you want it variable to be calculated using a field, then just put the field in the formula in the W spot (or whatever spot you want the units to be):
E.g.
DATEADD(Invoice Date;0;0;Weeks Until Due;0;0;0;0)
Hope that helps!
Brendan
March 30, 2018 at 12:23 PM #28017
Nigel ParrishParticipantThank you. I was overly complicating the formula.
I looked at a previous thread and it didn’t seem to help.
I will have play about with that tomorrow.
Nigel
March 30, 2018 at 1:23 PM #28018
BrendanKeymasterWell, as time goes on I add new features to Tap Forms and the DATEADD() function was one of them. It pays to stay up-to-date because of all the new features I add in most releases.
March 30, 2018 at 1:26 PM #28019
Nigel ParrishParticipantThank you. I’ve been using Tap Forms for a few years and it’s rock solid now. I’m going to try and use it to automate more with formulas and the like in 2018.
Nigel
May 13, 2020 at 8:28 AM #40580
FrancisParticipantThanks for the formula and thanks for the great work
-
AuthorPosts
You must be logged in to reply to this topic.