[Zope] ZSQL select on date/time
Casey Duncan
cduncan@kaivo.com
Fri, 06 Jul 2001 14:18:13 -0600
Loren Stafford wrote:
>
> Does anyone have a working example of how to select on a date/time column in
> an MSAccess database.
>
> Something like
>
> Arguments: FromDate:date
>
> select * from "Applicant Database"
> where [Date Received] > <dtml-sqlvar FromDate type=float>
>
> ...except the above syntax produces:
>
> Error type: sql.error
> Error value: ('07001', -3010, '[Microsoft][ODBC Microsoft Access Driver] Too
> few parameters. Expected 1.')
>
> ...regardless of value of type.
>
> -- Thanks
> -- Loren
>
I think MSAccess expects it's dates to be delimited by # as in:
#7/6/2001#
You might try:
select * from "Applicant Database"
where [Date Received] > #<dtml-var FromDate fmt="%x" sql_quote>#
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>