hello everyone...
here is my table field,for example:
VENDID VENDNAME DATE1 DAY1 DATE2 DAY2 DATE3 DAY3 INVTERM
---------------------------------------------------------------------------------------------------------------------------------
0001 AAA 2010/8/1 4 2010/8/7 6 2010/8/15 10
0002 BBB 2010/7/7 7 2010/7/21 8
0003 CCC 2010/6/6 10
0004 DDD 2010/7/1 3 2010/7/20 9
0005 EEE 2010/7/21 8
I've tried many times and searched through many webs but still can't get the solutions.
I have two problems:
1. The output of field "INVTERM" is a date/time fields. It should be the sum of THE LAST Date and Day.
The value of INVTERM above should be:
VENDID ... INVTERM
----------------------------------------------------------------------------------
0001 ... 2010/8/25
0002 ... 2010/7/29*
0003 ... 2010/6/16
0004 ... 2010/7/29*
0005 ... 2010/7/29*
2. On the form, only VENDNAMEs that have the same INVTERM is showed(with *), for example:
VENDNAME: BBB, DDD, EEE
In question one, I tried to write some scripts with IF-ELSE expression to calculate but somehow it didn't work.
In question two, I want to use the VIEW concept in Database, but I couldn't get the way to do.
Could someone give me some advice?
If there is any confusion on my questions, let me know please.
thank you anyway!
You have to convert the character date strings to the number days since the Epoch date before you can add the days to the date, and then you will have convert that computed number of days since the Epoch date to a date string. Look at the 'Date2Num' and 'Num2Date' FormCalc functions.
You could also break out the year month and day from the JavaScript date object, increment the days and then convert the year, month, and day values back to a date object and then back to a date string.
George Kaiser