Subject | RES: [ib-support] Select with dates |
---|---|
Author | Marcelo Pitanga |
Post date | 2002-12-27T17:38:16Z |
Another means :
AND (DAT_FAT BETWEEN :DAT_FAT_INI AND :DAT_FAT_END)
:DAT_FAT_INI, DAT_FAT_END are parameters in ADOQUERY.
ADOQUERY.PARAMBYNAME('DAT_FAT_INI').ASDATETIME := StrToDateTime(
Maskedit1.Text );
ADOQUERY.PARAMBYNAME('DAT_FAT_END').ASDATETIME := StrToDateTime(
Maskedit2.Text );
[]'s
AND (DAT_FAT BETWEEN :DAT_FAT_INI AND :DAT_FAT_END)
:DAT_FAT_INI, DAT_FAT_END are parameters in ADOQUERY.
ADOQUERY.PARAMBYNAME('DAT_FAT_INI').ASDATETIME := StrToDateTime(
Maskedit1.Text );
ADOQUERY.PARAMBYNAME('DAT_FAT_END').ASDATETIME := StrToDateTime(
Maskedit2.Text );
[]'s
> ----- Mensagem original -----
> De: Marcelo Pitanga [SMTP:marcelopitanga@...]
> Enviada em: sexta-feira, 27 de dezembro de 2002 15:20
> Para: 'ib-support@yahoogroups.com'
> Assunto: RES: [ib-support] Select with dates
>
> Hi Jorez,
>
> I have used CAST and work fine.
>
> SELECT .......
> WHERE
> ( DAT_FAT BETWEEN CAST('01/01/2002' AS DATE) AND CAST('31/12/2002' AS
> DATE))
>
>
> > ----- Mensagem original -----
> > De: Jorez A. Nasato [SMTP:jorez@...]
> > Enviada em: sexta-feira, 27 de dezembro de 2002 13:59
> > Para: ib-support@yahoogroups.com
> > Assunto: Re: [ib-support] Select with dates
> >
> > I have tried it, but I wold like to know if there was some problem tha I
> > didn't know.
> >
> > Thanks.
> >
> > ----- Original Message -----
> > From: "Helen Borrie" <helebor@...>
> > To: <ib-support@yahoogroups.com>
> > Sent: Friday, December 27, 2002 11:39 AM
> > Subject: Re: [ib-support] Select with dates
> >
> >
> > > At 10:45 AM 27/12/2002 -0300, you wrote:
> > > >Hi!
> > > >
> > > >I'm trying to do the folow select:
> > > >select * from table where data between '12/01/2002' and '12/23/2002'
> > > >
> > > >And in the table I have:
> > > >code------data--------------text
> > > >1 23/12/2002 xxxxxxxx
> > > >2 24/12/2002 yyyyyyyyy
> > > >
> > > >So, when I execute the select, its returns null, could someone help,
> > I'm
> > > >using FB and the database was created with dialect 1.
> > >
> > > Dialect 1 dates are timestamps. This query won't return the first row
> > if
> > > its time portion is greater than '00:00:00'. Change the WHERE clause
> to
> > one
> > > of the following:
> > >
> > > where data between '12/01/2002' and '12/23/2002 23:59:59.9999'
> > >
> > > or
> > >
> > > where data >= '12/01/2002' and data < '12/24/2002'
> > >
> > > heLen
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > ib-support-unsubscribe@egroups.com
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > ib-support-unsubscribe@egroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>