Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple Date/time question.
I think the default is hh24miss, which is six digits containing the 24 hour, minutes and seconds. So, 1:05:32 PM on Feb 1 would be '01-Feb-97 130532'.
However, check out the TO_CHAR() function, which is the converse function to the TO_DATE() function. You can use the TO_CHAR function to convert a string containing a date to a date/time value. It takes two parameters, the string and a formula Oracle can use to convert it. Something like....
TO_CHAR('02/01/97 13:05:32','MM/DD/YY HH24:MI:SS') You just need to know what the correct values are that Oracle will accept in the formula parameter.
Good luck,
Ed
On Mon, 17 Mar 1997 16:21:59 +0000, Force12 Solutions Ltd <Force12_at_force12.com> wrote:
>I understand you can have a combined date/time field in an Oracle
>table. Is this true? If so, what format should the values be entered in?
>I know the date goes in as '01-Jan-97'but I can't get a time to go in.
>
>Thanks in advance
>
>Hadi
>--
>Force12 Solutions Ltd
Received on Tue Mar 18 1997 - 00:00:00 CST
![]() |
![]() |