Subject | Re: DATE Comparision Problem |
---|---|
Author | jyotindra_bhoyania@yahoo.com |
Post date | 2001-10-09T06:02:09Z |
It is 12-OCT-2001.
I tried it and that solved my problem.
Thanks alot Adam,
-Jyotindra.
I tried it and that solved my problem.
Thanks alot Adam,
-Jyotindra.
--- In ib-support@y..., "Adam Clarke" <Adam.Clarke@S...> wrote:
> Is that date 12-OCT-2001 or 10-DEC-2001 ?
>
> Try writing it as above and see how you go.
>
> Cheers
> Adam
> ----- Original Message -----
> From: <jyotindra_bhoyania@y...>
> To: <ib-support@y...>
> Sent: Tuesday, October 09, 2001 3:29 PM
> Subject: [ib-support] DATE Comparision Problem
>
>
> > Hi All,
> >
> > I am using Firebird version 1.0.0.338 and I have a very strange
> > problem. I have a table in which I have got a field having
TIMESTAMP
> > datatype.
> >
> > Now when I query that table from ISQL as follows, It does not
return
> > ANYTHING. But the fact is there is a record having that value.
> >
> > SELECT * FROM BANK_HOLIDAY
> > WHERE BANK_HO_DTE = '12/10/2001 18:46:12';
> >
> > That table is having that value and I am able to see it if I look
at
> > the data of the table.
> >
> > I, then tried few other combination also but have not been able to
> > get result.
> >
> > Like:
> >
> > (1) SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS DATE )
> > = '12/10/2001';
> >
> > (2) SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS CHAR )
> > = '12/10/2001';
> >
> > (3) SELECT * FROM BANK_HOLIDAY WHERE BANK_HO_DTE = CAST
( '12/10/2001'
> > AS DATE);
> >
> > (4) SELECT * FROM BANK_HOLIDAY WHERE BANK_HO_DTE = CAST
( '12/10/2001
> > 18:46:12' AS TIMESTAMP );
> >
> > (5)SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS DATE )=
CAST
> > ( '12/10/2001' AS DATE );
> >
> > All failed to give me result. I am very much frustated due to
this.
> > Can anybody guide me on this.
> >
> > TIA,
> >
> > Jyotindra.