Phil

Try changing DateFormat to Format (ie using Access function
instead of CF one) and losing the pound signs.

(At least, they call them pound signs in the US.
I've no idea why. They're hash marks over here.)

Nick

-----Original Message-----
From: Phil Palmer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 21, 2000 2:26 AM
To: CF-Talk
Subject: Dates and Access


Dear All

I am used to using SQL Server or Oracle with CF so I am now using
Access and having a little trouble. 

I want to do a CFQUERY to load up a CFGRID with data from a db
table.  One of these fields is a date.  In SQL Server I just do some
manipulation with SQL to get an acceptable date format.  What
do I do with ACCESS?  I tried DATEFORMAT with CF as follows and got
the error below :

<cfquery name="get_activities"
         datasource="#ODBC_datasource#"
         dbtype="ODBC">

SELECT DISTINCT
  title,
  date_held,
  the_date = #DateFormat(date_held, "dd mmmm yyyy")#
FROM activities  
ORDER BY  title           
</cfquery>

THE ERROR I GET:

An error occurred while evaluating the expression: 
#DateFormat(date_held, "dd mmmm yyyy")#
Error near line 43, column 15.
-----------------------------------
Error resolving parameter DATE_HELD

What is the best way to get date data from ACCESS and display it
in a CFGRID?

Thanks
Phil Palmer


**********************************************************************
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to