all groups > flash actionscript > july 2007 >
You're in the

flash actionscript

group:

Date Fields


Re: Date Fields DMennenoh **AdobeCommunityExpert**
7/24/2007 3:07:50 PM
flash actionscript:
If your dateField components have instance names of startDate and endDate
then:

var days = (endDate.selectedDate.valueOf() -
startDdate.selectedDate.valueOf()) / 1000 / 60 / 60 / 24;

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Re: Date Fields DMennenoh **AdobeCommunityExpert**
7/24/2007 5:39:27 PM
You're welcome.

--
Dave -
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/

Date Fields Steele Imaging
7/24/2007 7:52:28 PM
If I have 2 date fields on stage can I calculate the difference?

For instance...

Someone wants me to run a banner ad on a website. Say I charge $XX per day. If
I have a dateField labeled 'startdate' to signal the day that the banner ad
will start, and another dateField labeled 'enddate' signaling the date it ends.
I need to calculate the days between start and stop and multiply it by the
current rate.

How is this possible?
Re: Date Fields Steele Imaging
7/24/2007 8:13:07 PM
Well Dave... it really just had to be that simple! lol...

AddThis Social Bookmark Button