Hi,
I seem to have some trouble collecting TIme and Date and inserting and retrieving them back.
$trackInsert = "INSERT INTO trackingDB (url,dateofHit,ipaddress) VALUES('$url', to_date(sysdate, 'dd-mm-yy hh24:mi:ss'),'158.858.11.249')";
And this works but when i perform a select statement from this table all i get back is the Date not the actual time. This was using a normal select statement for dateofhit column. Then we tried the following statement.
select to_char(dateofhit, 'Dy DD-Mon-YYYY HH24:MI:SS') from trackingDB;
Which returned back the time but showed all 00:00:00.
Any help ?
Oracle Date and TIme format
Moderator: General Moderators
Re: Oracle Date and TIme format
typo?lunny wrote:'dd-mm-yy hh24:mi:ss'