Calculate Days between two dates

308 views
Skip to first unread message

Affinit

unread,
Apr 22, 2009, 10:05:52 PM4/22/09
to Adobe LiveCycle Developers
HI does anyone know the javascript to calculate the days between two
dates ?

i have dateIn and DateOut and need the javascript.

i have done in formCalc but i now have other calculations that i need
and i can't get javascript to read teh formcalc results.

basically i have a car hire form.

when you select a car it will input a cost price into the cost field.

however depending on the number of days you hire it will show a
different cost.

so i need the number of days between two date fields in order to run
my if else statements.

can anyone help ?

LiveCycle Lifeline

unread,
Apr 23, 2009, 10:08:45 AM4/23/09
to Adobe LiveCycle Developers

Duane Nickull

unread,
Apr 23, 2009, 11:48:00 AM4/23/09
to live...@googlegroups.com
Can you not subtract the date object from the second one?  I know this works in ActionScript.  Do you need to round precision points?

Duane
Reply all
Reply to author
Forward
0 new messages