Date problem
I have never been very good at dates ![]()
I have a calendar that is not woking properly since I switched the db from access to sql Learning SQL also ![]()
<cfif isdefined("month")>
<cfparam name="startdate" default=#createdate(year,month,1)#>
</cfif>
<cfparam name="startdate" default='#month(now())#/1/#year(now())#'>
<cfset #enddate# = #dateadd('m',1,startdate)#>
<cfset #enddate# = #dateadd('d',-1,enddate)#>
<cfquery name="GetEvents" datasource=#dbname#>
Select * from tblCalendar
Where (Evt_Date >= ###dateformat(startdate,'mm/dd/yyyy')### AND Evt_Date <= ###datedateformat(enddate,'mm/dd/yyyy')###)
AND evt_approved = 1 and siteid='#siteid#' and scoutid=<cfqueryparam value="#url.scoutid#" cfsqltype="cf_sql_varchar">
</cfquery>
The problem is this.. It displays the current month just fine, however, when I click next or previous month, it does not change...stays on august.
Not sure what I am missing.
Thanks in Advance
Sharon
