Calculate with today in if clause
Posted in 2006
Topics: General Discussion
Hello list. I'got a small problem with one report. I have to write a report which results is an overview about age distribution in one table I try to use the if statement like if gebdat between (today - 6570) and (today - 10950) Gebdat is a date-type field. How can get result a want to have? IDS is an very old 7.30 Any ideas? Thanks in advance for your friendly advices. Best regards. Dirk Emmermacher
dbaccessdemo7 <<!
N
!
dbaccess stores7 <<!
select * from orders
where order_date between today - 10000 units day and today - 5 unitsday
!
see you
Superboer.
emmermacher@hotmail.com schreef:
> Hello list.
>
> I'got a small problem with one report.
> I have to write a report which results is an overview about age
> distribution in one table
>
> I try to use the if statement like
> if gebdat between (today - 6570) and (today - 10950)
>
> Gebdat is a date-type field.
> How can get result a want to have?
> IDS is an very old 7.30
>
> Any ideas?
>
> Thanks in advance for your friendly advices.
>
> Best regards.
>
> Dirk Emmermacher
emmermacher@hotmail.com wrote: > Hello list. We need SOME details: Server version Platform (OS & Hardware) Front-end (ie: Esql/C, Perl-DBD/DBI, ISQL (Perform, ACE), I4GL, R4GL, ODBC, PHP, JDBC, Stored Procedures, etc.) Art S. Kagel > I'got a small problem with one report. > I have to write a report which results is an overview about age > distribution in one table > > I try to use the if statement like > if gebdat between (today - 6570) and (today - 10950) > > Gebdat is a date-type field. > How can get result a want to have? > IDS is an very old 7.30 > > Any ideas? > > Thanks in advance for your friendly advices. > > Best regards. > > Dirk Emmermacher >
Art S. Kagel wrote: > emmermacher@hotmail.com wrote: >> Hello list. > > We need SOME details: > > Server version > Platform (OS & Hardware) > Front-end (ie: Esql/C, Perl-DBD/DBI, ISQL (Perform, ACE), I4GL, R4GL, > ODBC, PHP, JDBC, Stored Procedures, etc.) > > Art S. Kagel > >> I'got a small problem with one report. >> I have to write a report which results is an overview about age >> distribution in one table >> >> I try to use the if statement like >> if gebdat between (today - 6570) and (today - 10950) >> >> Gebdat is a date-type field. >> How can get result a want to have? >> IDS is an very old 7.30 >> >> Any ideas? >> >> Thanks in advance for your friendly advices. >> >> Best regards. >> >> Dirk Emmermacher >> Units? This could be in years, or seconds :p
On Tue, 2006-11-07 at 13:51 -0500, Art S. Kagel wrote: > Front-end (ie: Esql/C, Perl-DBD/DBI, ISQL (Perform, ACE), I4GL, R4GL, ODBC, > PHP, JDBC, Stored Procedures, etc.) You forgot Python ;) -Carsten