To work with Access dates configured as either OLE-DB or ODBC data sources, use single 
quotes ('03/31/2000') or double pound signs (##03/31/2000##). The CreateDate and 
CreateODBCDate functions can only be used with an ODBC data source.


  ----- Original Message ----- 
  From: Snyder, Jason 
  To: CF-Talk 
  Sent: Tuesday, August 28, 2001 10:13 AM
  Subject: RE: Dates in Access


  It seems that normally in Access and with ASP (VBScript) you access date fields with 
# signs around the value.  For some reason ColdFusion doesn't like it when I do that.  
What I do is to use single quotes instead and it seems to make things happy once again.

  -----Original Message-----
  From: Bud [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, August 28, 2001 2:56 AM
  To: CF-Talk
  Subject: Re: Dates in Access


  On 8/28/01, Kay Smoljak penned:
  >Sorry for what is undoubtably a basic question, but I've been spoilt
  >with SQL Server. I'm trying to insert a date into an Access database.
  >The parts of the date have been split into their day, month and year
  >components - and #createdate(form.year,form.month,form.day)# is throwing
  >a very unhelpful "syntax error" in Access. So is
  >#createODBCDate(created_date)# (after assigning the results of
  >createdate() to created_date). So how are dates meant to be formatted?

  There's no reason this shouldn't work:

  #CreateODBCDate(createdate(form.year,form.month,form.day))#

  If that throws an error then there is something wrong with the form 
  values you are passing.
  -- 

  Bud Schneehagen - Tropical Web Creations

  _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  ColdFusion Solutions / eCommerce Development
  [EMAIL PROTECTED]
  http://www.twcreations.com/
  954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to