Subject | Re: [ib-support] Problem with dates in SP |
---|---|
Author | Martijn Tonies |
Post date | 2002-08-19T15:59:01Z |
Well, this works fine for me:
select *
from bestelling
where leverdatum > current_date - 140
Where leverdatum > currentdate - 140 days...
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
select *
from bestelling
where leverdatum > current_date - 140
Where leverdatum > currentdate - 140 days...
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> At 14.08 19/08/2002 +0200, you wrote:duration.
> >Sorry Marco, you may not like my answer, cause it is likely to give you
> >more work than you expected.
> >
> > >I have to do
> > >DELTA_TIME = CAST( <VariableDefinedAsANumber> AS TIMESTAMP );
> > >right?
> >
> >No, you're dealing with two different things. A timestamp is a specific
> >point in time, e.g. 19 August 2002 at 14:04:32.332, whereas what you are
> >left with after having subtracted one timestamp from another is a
> >Casting this back to a timestamp is probably not what you want, and e.g.19
> >August 2002 at 14:04:32.332 - 19 August 2002 at noon would give you 30a
> >December 1899 at 02:04:32.332 (or something similar). Duration really is
> >number, and ought never to be treated as anything else.than
>
> OK so my need is this:
> I give to a SP a TIME_DELTA
> and it has to return me all records that have a field (ORA_INVIO) lower
> CurrentTime-P_DELTA
>
> What can I do to achieve this result?
> Regards
> Marco