|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
The following works:
<cfquery name="Query_Rap" datasource="Evalenseig"> SELECT NumEval, TypeEval, Langue, Enseignant, Programme, Cours, Sigle, SessionID, Password2, Expr1, Expr2 FROM GestionDate WHERE Expr1 > 2001-01-01 </cfquery> This doesn't work: <cfquery name="Query_Rap" datasource="Evalenseig"> SELECT NumEval, TypeEval, Langue, Enseignant, Programme, Cours, Sigle, SessionID, Password2, Expr1, Expr2 FROM GestionDate WHERE Expr1 < 2005-01-01 </cfquery> There are records that exist to meet both criteria. The problem seems to be the less than sign "<". Does anyone have any suggestions?I'm using ColdFusion MX. ![]() |
|
#2
|
|||
|
|||
|
What database are you using?
|
|
#3
|
|||
|
|||
|
Hello again ChiMex, I certainly appreciate your help. I am using Microsoft Access2000. Sorry, I should have mentioned this.
|
|
#4
|
|||
|
|||
|
Try wrapping your date with CreateODBCDate like this:
Code:
<cfquery name="Query_Rap" datasource="Evalenseig">
SELECT NumEval, TypeEval, Langue, Enseignant, Programme, Cours, Sigle, SessionID, Password2, Expr1, Expr2
FROM GestionDate
WHERE Expr1 < CreateODBCDate('2005-01-01')
</cfquery>
See if that helps.... |
|
#5
|
|||
|
|||
|
Chi-mex thank-you very much! When I noticed createdate function before I overlooked it because I assumed the Create part referred to creating a new date maybe random or something. The last thing I thought was it would format an existing date so it would be recognized properly by ColdFusion. After your posts I re-visited the CreateODBCDate function and it worked flawlessly.
Again Thank-you! ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > Date comparison problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|