I'm having problems calculating the difference between two dates from two fields that use a date format of "YYYYMMDD". As an example they enter in the first field 20080106 and in the second field they enter 20070804. A third field will show how many months and days there are between those two dates. I got this calculation working using mm/dd/yyyy but for some reason it will not calculate using yyyymmdd. How can I get this to work using YYYYMMDD in both fields?
[url=http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/]http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/[/url]
It sounds like your problem is not so much with date calculations but with Parsing the date. When asking a question here please be specific. Tell us your exactly what it is you are doing and exactly what the problem is.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script