Hello,
I have a date field that I want to be able to add a number to it so can create a invoice due date. I have been searching through various threads and thought I might find the code to accomplish this.
Any Ideas?
Thanks
Erich
Hello,
I have a date field that I want to be able to add a number to it so can create a invoice due date. I have been searching through various threads and thought I might find the code to accomplish this.
Any Ideas?
Thanks
Erich
in sql (both ASA and M$ sql)
dateadd (day,,)
try this:
var vDueDate = invoicedate; //invoicedate is column in DB
var vDays = 14
vDueDate.setDate(vDueDate.getDate()+vDays);
duedate = vDueDate //duedate is column in DB
Thank you so much, that worked great.
I also was trying to figure out a date calc:
get the last service date from the records in a related table. I got it to work by creating a self-join in the child records then a calc in the parent record to display the last record sorted by date. I am sure that there is a much easier way with one line of code to create a calc in the parent record that displays the last service date from the child records. I tried with the indexing but i had trouble with the date.
Thanks inadvance, there are so many options in servoy(which is a great thing)!