Slight modification to one of your lines:
<cfset iWeeks = datediff(ww,listLast(sDate
should be
<cfset iWeeks = datediff(ww,listLast(sDate
If the data is stored as "07/23/2006-07/20/2006"
This is because both ListFirst and ListLast will be looking for a comma as a delim, and when it doesn't find one, will assume it's just a one item list.
Main Topics
Browse All Topics





by: adonis1976Posted on 2006-07-23 at 19:33:41ID: 17165057
Say for example you have a record like 07/23/2006-07/20/2006
),listFirs t(sDate))>
You can do something like this:
<cfset sDate = "07/23/2006-07/20/2006"
<cfset iWeeks = datediff(ww,listLast(sDate
iWeeks should give you the difference in weeks..