Link to home
Start Free TrialLog in
Avatar of moyedokun
moyedokun

asked on

Finding out number of weeks by date range

I have a record with a date range.  Is there a way to determine the number of weeks that is included in the date range?
Avatar of adonis1976
adonis1976

Say for example you have a record like 07/23/2006-07/20/2006

You can do something like this:

<cfset sDate = "07/23/2006-07/20/2006"

<cfset iWeeks = datediff(ww,listLast(sDate),listFirst(sDate))>

iWeeks should give you the difference in weeks..
SOLUTION
Avatar of usachrisk1983
usachrisk1983
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
yep sir.. agree with you.. i was asleep when I wrote that code..
Avatar of moyedokun

ASKER

I get an error.  It is telling me that ww is undefined.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dgrafx