This content has been marked as final.
Show 6 replies
-
1. Re: Substruct 2 Dates and get full month difference
NSurveyor May 19, 2006 2:13 PM (in response to luciewong)Flash already knows the current date, so you could use something like:
aDate="3/10/2006";
TimeUsed.text = monthsBetween(toDate(aDate),new Date()));
//followed by attached code
If you are given both dates, from database....
aDate="3/10/2006";
bDate="5/20/2006";
TimeUsed.text = monthsBetween(toDate(aDate),toDate(bDate));
//followed by attached code -
2. Re: Substruct 2 Dates and get full month difference
luciewong May 19, 2006 9:27 PM (in response to NSurveyor) -
3. Re: Substruct 2 Dates and get full month difference
luciewong May 19, 2006 9:31 PM (in response to luciewong)But...
just curious, does it work also when for example
the start date is > 5/11/2006
and
the end date (today) is > 2/15/2007
does it count 8 months?
Ok, I try. -
4. Re: Substruct 2 Dates and get full month difference
NSurveyor May 20, 2006 6:12 AM (in response to luciewong)I count 9 months.
1. 5/11 to 6/11
2. 6/11 to 7/11
3. 7/11 to 8/11
4. 8/11 to 9/11
5. 9/11 to 10/11
6. 10/11 to 11/11
7. 11/11 to 12/11
8. 12/11 to 1/11
9. 1/11 to 2/11
THe program finds the same as well... unless I'm missing something? -
5. Re: Substruct 2 Dates and get full month difference
luciewong May 20, 2006 11:32 AM (in response to NSurveyor)No, NSurveyor,
it works just fine,
thank you.
Luciewong -
6. Re: Substruct 2 Dates and get full month difference
NSurveyor May 20, 2006 4:00 PM (in response to luciewong)You're welcome.