---Reply to mail from Shally Kon about 
> Please help me!
> I am trying to insert 3 fields plus  current date into my table .What I want
> is that when ever the form is loaded the current date should popup
> automatically in the format "mm/dd/yyyy" and when I press submit button then
> all the fields plus the current date should be inserted in the table.I am
> using Create date function.but the output I am getting is "{d '2000-04-28'}"
> as the output.I am using access database and have specified the datatype of
> date field as "date/time".
> <cfinput type="text" name="Date" size="10" maxlength="10" required="yes"
> validate="Date" message="Date is required!" value="#CreateODBCDate(Now())#">
> 

Your problem is that CreateODBCDate creates, well, an ODBC date object
which is in the format above.  To solve this use CreateDate(Now())
(optionally using DateFormat(...) to format to your desired display) to fill the
date field, and convert the results to an ODBC date before inserting into
the table by using CreateODBCDate() with the contents of your form field
(depending on the format you might have to use CreateDate on the form
field first and use the date/time object for the CreateODBCDate() call).



------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to