Ask a Question related to Coldfusion Database Access, Design and Development.
-
wantaknowcf #1
Query by date doesn't work
I'm using Informix 9.3, If I run the query in Informix it works, when I run
the same query in ColdFusion I get a string to date conversion. I'm using the
Informix JDBC that comes with ColdFusion 6.1.
SELECT uid, sdate
FROM train_cal_test
WHERE sdate>'10/30/2005'
I've tried the date with and without single and double quoates.
wantaknowcf Guest
-
date query problem, date in variable
I am using the following query : $query_archief = "SELECT * FROM vacatures where dd_eind_plaatsing < $dd_eind_plaatsing_archief1" note:... -
PHP Date Query
I'm trying to create a recordset where I query a date field in my database. I can't figure the syntax. A little help here: WHERE Category =... -
Date Query
I am attempting to pull information from a database and the main criteria of how I retrieve the information in a date format. The startdate and... -
SQL/ASP.NET getting DATE to work in query
I'm grabbing today's date with some ASP.net code: Dim Today As Date Today = Microsoft.VisualBasic.Today() I'm then trying to run a SQL query... -
Date query in ASP
ASP/Scripting newbie question here. I have an access database that I am writing ASP pages to query and return the results. The end user can put... -
jonwrob #2
Re: Query by date doesn't work
Try the CF function CreateODBCDate() or the Informix equivalent of TO_DATE to force the correct date-string conversion.
JR
jonwrob Guest
-
Diacritical #3
Re: Query by date doesn't work
User CFQUERYPARAM... it's not just good security, it speeds things up and
resolves these variable casting problems:
SELECT uid, sdate
FROM train_cal_test
WHERE sdate > <cfqueryparam cfsqltype="cf_sql_date"
value="10/30/2005">;
Diacritical Guest
-
BKBK #4
Re: Query by date doesn't work
Wantaknowcf, is this an idea?
SELECT uid, sdate
FROM train_cal_test
WHERE sdate > DATE('10/30/2005')
BKBK Guest
-
wantaknowcf #5
Re: Query by date doesn't work
Thank you for the input. I use the date qualifier when running a query against the database and it work. I use createODBCdate when I need to save a date to the database.
wantaknowcf Guest
-
wantaknowcf #6
Re: Query by date doesn't work
I want to thank everyone for their help. I found several thinks I did wrong.
My biggest mistake was quotes around the form.date when adding or editing. I
use Dreamweaver to create the add query and it adds the quotes. I know to
remove them now. Informix has a date qualifier that I'm using a query to
search, like this. where date(sdate)> date(session.svsdate).
When I use a form to add a date to the database I use two methods to choose.
One is CreateODBCdate() and the other is CFquerypram with the type and value.
Thanks again with everyones help I have my date problems in Informix under
control.
wantaknowcf Guest



Reply With Quote

