Working on a form that's sort of a timesheet. How would I fill in other fields based on an initial date ?? IE: Field-A, a date/time field gets filled in. I'd then like to automatically fill in another 13 fields for the time period with dates based off Field-A. In advance - many thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Presume that your Date field has the value pattern as DD/MM/YYYY
You can convert it's rawvalue into number of days using the following script in FormCalc
var firstDate = Date2Num(DateField1.rawValue,"DD/MM/YYYY")
now firstDate will have the number of days since epoch.
Next step you can add 1 to the firstDate and convert it back into Date Object using the following syntax
secondDateField.rawValue = Num2Date(firstDate,"DD/MM/YYYY")
Similarly you can do it for all 13 date fields.
Nith
Views
Replies
Total Likes
Presume that your Date field has the value pattern as DD/MM/YYYY
You can convert it's rawvalue into number of days using the following script in FormCalc
var firstDate = Date2Num(DateField1.rawValue,"DD/MM/YYYY")
now firstDate will have the number of days since epoch.
Next step you can add 1 to the firstDate and convert it back into Date Object using the following syntax
secondDateField.rawValue = Num2Date(firstDate,"DD/MM/YYYY")
Similarly you can do it for all 13 date fields.
Nith
Views
Replies
Total Likes
Sweet.
Thank you.
John Rojowski
DFAS/IND DJMS-AC SIT
Phone: 317-212-7470
"Simplify."
Views
Replies
Total Likes