Problem Inserting Date Time [message #84693] |
Sat, 17 April 2004 23:06  |
Krshanu
Messages: 10 Registered: September 2002
|
Junior Member |
|
|
Hi,
I am trying to insert into a Date column.I am taking one Char in 'dd/mm/yyyy' form from one field and another Char in 'hh24:mi' form from another.I am Concating them , so that the concatenated_string is '18/04/2004 12:38'
Then I am assigning it to the Date column in Pre Insert Trigger
Date_Field :=
To_Date(concatenated_String,'dd/mm/yyyy hh24:mi')
But In Database it is going as '18/04/2004 00:00'
instead of '18/04/2004 12:38'.
Can anybody Help.
Thanks in Advance
Krishanu
|
|
|
Re: Problem Inserting Date Time [message #84716 is a reply to message #84693] |
Tue, 20 April 2004 06:30   |
jan
Messages: 71 Registered: August 2002
|
Member |
|
|
Please check if you are by any chance using the trunc function.
ie. trunc(Date_Field) while inserting.
SELECT to_char(sysdate,'dd/mm/yyyy HH24:mi') Dt1,
to_char(trunc(sysdate),'dd/mm/yyyy HH24:mi') Dt2
FROM dual
dt1 dt2
20/04/2004 10:34 20/04/2004 00:00
Jan
|
|
|
|