LeadCo
asked on
How do you create dates for today, this week,this month and this year in cf8.
How do you create dates for today, this week,this month and this year in cf8.
My code:
Experts :
I have a variable called leadframe being passed via cfdiv bind from form element leadframe.
the options are: today, thisweek,thismonth,thisyea r
I understand how to set the variables i just don't know how to calculate the values.
I want to set startdate to the calendar date to begin query and enddate to end query.
My code:
Experts :
I have a variable called leadframe being passed via cfdiv bind from form element leadframe.
the options are: today, thisweek,thismonth,thisyea
I understand how to set the variables i just don't know how to calculate the values.
I want to set startdate to the calendar date to begin query and enddate to end query.
<cfif leadframe EQ "today">
<cfset startdate = "">
<cfset enddate = "">
<cfelseif leadframe EQ "thisWeek">
<cfset startdate = "">
<cfset enddate = "">
<cfelseif startdate EQ "ThisMonth">
<cfset startdate = "">
<cfset enddate = "">
<cfelseif leadframe EQ "ThisYear">
<cfset startdate = "">
<cfset enddate = "">
</cfif>
Query:
Select * from mytable where date between startdate and enddate
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER