Highlighted

Date/Time Calculation

Avatar

Guest

08-07-2008

I am new to Adobe Acrobat 8 and i have never created a form before. I am trying to calculate Departure Date/time with Arrival date/time to give me a total trip time. So far i have this, but nothing is happening. Can anyone help me with this?



var StartInterval = 0

if(HasValue(ArrivalDate) and HasValue(DepartDate)) then

StartInterval = Time2Num(ArrivalDate.formattedValue, "date{MM-DD-YYYY} time{HH:MM:SS A}") - Time2Num(DepartDate.formattedValue, "date{MM-DD-YYYY} time{HH:MM:SS A}")

else

0

endif

Replies

Highlighted

gkaiseril

20-07-2008

Your formatted date time fields are displaying exactly the date and time as you have posted in your format parameter?



I would think it would be more like: "MM-dd-YYYY HH:MM:SS A".