Hi there,
I've just started using nuBuilder (which I'm loving so far!) and as a test case I'm building a simple database that keeps records of equipment and when it was last calibrated. Most fields are either typed by the user or lookups from other tables and that's all working a treat.
I want a column in the form that displays the calibration due date, which would be the calibration date field + 2 years. I initially set this up as a calc field in the initial form (so I have a database field allocated to it), but realised it isn't possible to do calculations on date fields, so I've hit a brick wall currently on how to achieve this.
Can anyone point me in the right direction please?
Thanks,
Andy.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Adding to a date
-
- Posts: 55
- Joined: Tue Apr 16, 2019 1:32 pm
Re: Adding to a date
Andy,
Have you considered adding a field like Calculated_Date and using a DATE_ADD() function? The arguments DATE_ADD() accepts are listed here:
https://www.w3schools.com/sql/func_mysql_date_add.asp
Then, you could simply display that field.
Have you considered adding a field like Calculated_Date and using a DATE_ADD() function? The arguments DATE_ADD() accepts are listed here:
https://www.w3schools.com/sql/func_mysql_date_add.asp
Then, you could simply display that field.
-
- Posts: 2
- Joined: Tue Jun 11, 2019 4:21 pm
Re: Adding to a date
Thank you!Have you considered adding a field like Calculated_Date and using a DATE_ADD() function?
I don't know why I didn't think of this, as I'd already used CONCAT in another field to combine multiple values, but my SQL is rusty and this was just the trigger I needed!