RE: sql question

RE: sql question

 

  

The column will probably not be of the format '06/02/2010 06:00:00' but
is most likely to be of the format DATE.

The date is stored internally as a number representing the date and the
time portions. It's up to you when you want to use that date to convert
it into a different format.

So in your example you would want to put

select msg_datebegin
from msg
where msg_datebegin between
To_date('06/02/2010 06:00:00','dd/mm/yyyy hh24:mi:ss') and
To_date('24/11/2006 06:00:00','dd/mm/yyyy hh24:mi:ss');

I think if you specify the date just as a character string (without the
to_date) then you can only specify the date and not the time - although
I'm not sure how this is affected by the NLS_DATE_FORMAT. Try some
experiments!


Stephen Weston



-----Original Message-----
From: David NGUYEN
[mailto:oracledba-ezmlmshield-x44407666.[Email address protected]
Sent: 02 November 2006 08:38
To: LazyDBA Discussion
Subject: sql question


hello experts

please have a look of that:

select msg_datebegin from msg where msg_datebegin between
'06/02/2010 06:00:00' and '24/11/2006 06:00:00';
ORA-01830: date format picture ends before converting entire input
string

the msg_datebegin column is under format '06/02/2010 06:00:00'
the error message is like the first part of the format was converted
into
a valid date but not the second part.
anyone has a idea to correct this issue..?

thanks in advance
david..




(See attached file: C.htm)


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



Oracle LazyDBA home page