Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DateTime in SQL
In article comp.databases.oracle.misc:<yqqb4.6816$zp.101088_at_news3.mia>, "Wolf" <wolf_at_mrsoxx.com> writes:
>Bob Johnson <robertsj_at_best.com> wrote in message
>news:386afcf3$0$222_at_nntp1.ba.best.com...
>> I would like to filter a select statement by using date and time:
>> select * where datefield = to_date('12/28/99 19:00:00')
>> But, this doesn't work. How do I do this? Thanks, Bob
>You need to use the quoted date format model as the second argument in the
>to_date function.
>
>select * from <table>
>where <datefield> =
> to_date('12/28/99 19:00:00','MM/DD/YY HH24:MI:SS');
MM/DD/RR ...
could have been a sensible option depending upon what low year numbers would mean :-)
Jacqui
--
Paul Ingram Group Ltd,140A High Street,Godalming GU7 1AB United Kingdom
Email: J.Caren_at_ig.co.uk Fax: +44 1483 862801 Phone: +44 1483 862800
SmartCards in e-commerce? http://www.smartaxis.com/
Received on Tue Jan 11 2000 - 09:39:54 CST
![]() |
![]() |