Quote:
Originally Posted by macropod
What are DATE1 & DATE2? mergefields? formfield bookmarks? What regional date/time setting are you using? Do you have other fields in the document (eg for date calculation) that use the same bookmark names that the above field uses (see the SET fields)?
|
I have tried the following combinations for Date1 & Date2:
Both as fill-in formfield bookmarks (as standard text type and also as fixed dd/MM/yyyy Date types).
Date1 as formfield bookmark and Date2 as a { SET Date2 ... } parameter type.
All give the same results.
Regional settings should be either English/Uk or English/Ireland, but the workstation is locked down so I can't confirm that. All dates in the system, windows, and Word/Excel etc default to dd/MM/yyyy which would support the assumption, however.
There are 3 other calculations in the same document which re-use the "+n days" calculation, so they repeat the same bookmarks. These all work correctly, and reference the same Date1 Date2 bookmark information. I have copied the code above to a new blank document and recreated the fields, but the results are still the same.
If I quote out the result bookmarks, I get:
dd = "6"
mm = "-22"
yy = "2014"
so it does not look like the error is part of the formatting switch.
I tried retyping the code more than once, and tried copying the field codes directly from the Date Calculation doc to eliminate the possibility that I typed it incorrectly, but still got the same error. Having said that, I've just tried doing it in the blank document and I am getting the correct result!
Headwrecker!