Subject | Re: [firebird-support] Re: Date problem in Firebird |
---|---|
Author | Helen Borrie |
Post date | 2005-06-12T13:46:45Z |
At 11:50 AM 12/06/2005 +0000, you wrote:
format enclosed in single-quotes. 'xx/xx/xxxx' is dangerous unless you're
in the USA because it will be interpreted always as 'mm/dd/ccyy' so
'25/12/2005' is an illegal date. '1/01/2005' is a legal date. So is
'12/13/2005'; but '13/12/2005' isn't.
Several formats are safer, e.g. 'dd-Mmm-ccyy', 'dd.mm.ccyyy', 'ccyy-mm-dd',
'ccyymmdd', to name a few.
databases going to distinguish your expression from an illegal calculation
expression?
./hb
>The other date problem that I have run across is the use of aYes, use a date literal, that is, an engine-recognised stringish date
>regular date syntax within in SQL statement.
>
>ie.
>
>SELECT FROM mytable WHERE mydatefield > 1/01/2004;
>
>This results in this error: conversion error from string "0".
>
>Is there a way to get regular date to work in 1.5 WITHOUT casting or
>some function use.
format enclosed in single-quotes. 'xx/xx/xxxx' is dangerous unless you're
in the USA because it will be interpreted always as 'mm/dd/ccyy' so
'25/12/2005' is an illegal date. '1/01/2005' is a legal date. So is
'12/13/2005'; but '13/12/2005' isn't.
Several formats are safer, e.g. 'dd-Mmm-ccyy', 'dd.mm.ccyyy', 'ccyy-mm-dd',
'ccyymmdd', to name a few.
>I'm converting from sereval other databases and this type of SQLIt's *standard* not to quote date literals? How are these "standard"
>statement is standard.
databases going to distinguish your expression from an illegal calculation
expression?
./hb