Home » RDBMS Server » Server Administration » How to change date format with millisecond in Oracle8
How to change date format with millisecond in Oracle8 [message #373641] Sat, 28 April 2001 03:08 Go to next message
liulianqing
Messages: 1
Registered: April 2001
Junior Member
hello!
I want to import text format data into Oracle . The date column contains millisecond like '2001-04-28 14:20:25:123' .
I test following statement in sql*plus :
select to_date('2001-04-28 14:20:25:123','yyyy-mm-dd hh24:mi:ss:###') from dual ;
In Oracle7 it can convert and in Oracle8 it does not work .
How can i convert the string into date format in Oracle8 ?
Thanks!
Re: How to change date format with millisecond in Oracle8 [message #373658 is a reply to message #373641] Mon, 30 April 2001 12:40 Go to previous message
Andrew again...
Messages: 270
Registered: July 2000
Senior Member
This will work as long as you have leading '0' on DD, MM, hh24, mi < 10.
select to_date(substr('2001-04-28 14:20:25:123',1, 19),'yyyy-mm-dd hh24:mi:ss') from dual ;
Previous Topic: where is it?
Next Topic: how do you see all the tables in Oracle8 ?
Goto Forum:
  


Current Time: Sat Jun 29 00:10:14 CDT 2024