Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ORA-01850: hour must be between 0 and 23

ORA-01850: hour must be between 0 and 23

From: Default User <_at_here.com>
Date: Wed, 19 May 1999 20:54:05 GMT
Message-ID: <374324ED.758B9889@here.com>


I am having some difficulty loading dates and times into Oracle. I want to convert a text field to a date field. The data looks like this:

DATE_TIME_ADD_C


19901022:080309
19901012:151428
19900729:100240
19900731:122328
19900720:112208
19900921:122858
19920218:082454
19960308:140204
19960415:092246
19960415:093028
19600101:001200
19600101:001200

I am using this select statement, later if I can get this to work I will combine it with an insert.

SELECT to_date(date_time_add_ch,'YYYYMMDD:HH24MISS')

	FROM table
	WHERE date_added is not null;

This is the error message I get.

ORA-01850: hour must be between 0 and 23

Here is what I have tried. I peeled the leading zeros off the time to see if It would convert that way.

I tried converting the string to numbers first and then tried a date conversion.

I always get the same error

ORA-01850: hour must be between 0 and 23

Any ideas Thanks. Received on Wed May 19 1999 - 15:54:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US