Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Date/Time Calculation

Avatar

Former Community Member
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
1 Reply

Avatar

Level 7
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".