Re: datetime conversion help
Posted in 1998
Paul Roberts — — source: Informix-list mailing list archive (1991-1998)
In article <6sn6dq$lk7$1@nnrp1.dejanews.com>,
<roger.bruening@metrokc.gov> wrote:
>I am trying to do some date time manipulation with SQL (not SPL) so that
> where datetimefield > yesterday 2:59 am
> and datetimefield < today 3am.
How about this:-
select ....
from your_table
where datetimefield > ( extend ( today, year to second )
- 1 units day
+ 2 units hour
+ 59 units minute
)
and datetimefield < ( extend ( today, year to second ) + 3 units hour )
- Paul (not a spokesman)
~
~
~
~