Subject | Re: [firebird-support] X minutes ago |
---|---|
Author | Lester Caine |
Post date | 2006-07-17T08:33:15Z |
d_dude_2003 wrote:
rather than d/m/y but I'm not sure what Delphi passes as 'AsDateTime'
--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop -
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php
> I need to select the rows which have the TIMESTAMP field value moreWhere are you getting Now from?
> than X minutes ago from the current moment.
>
> SELECT * FROM VISIT_DETAIL
> WHERE (CHECKOUT_TIMESTAMP IS NULL) AND (CHECKIN_TIMESTAMP
> <= :CHECKIN_TIMESTAMP)
>
> and then i popuplate the query parameter in Delphi application
>
> FQuery.ParamByName('CHECKIN_TIMESTAMP').AsDateTime := Now - X/(24*60);
> Looks like something is wrong with this.What is the error?
> Whats the correct way to do this?This should work - usual problem is that the date format is wrong. m/d/y
rather than d/m/y but I'm not sure what Delphi passes as 'AsDateTime'
--
Lester Caine - G8HFL
-----------------------------
L.S.Caine Electronic Services - http://home.lsces.co.uk
Model Engineers Digital Workshop -
http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php