I am passing a date from a form in 2 parts (month and year)
The following code is giving me an error. The error is related to the date. Any ideas?
The following code is giving me an error. The error is related to the date. Any ideas?
Code:
<cfif isDefined("Form.addrecord")>
<cfset theDate = CreateDate(Form.theYear, Form.theMonth, 1)>
<cfquery name="insert_newsletter" datasource="thedatesource" dbtype="ODBC">
INSERT INTO Newsletter(NewsletterDate, NewsletterTitle)
VALUES ('#theDate#','#Form.NewsletterTitle#')
</cfquery>
</cfif>