Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert to timestamp in oracle

NewLearnerJun 24 2014 — edited Jun 25 2014

I am migrating sql server to oracle ( my version is 11g)

in sql server

------------ --> statement 1

select FLOOR(Convert(Float, current_timestamp));

----------------------

41812 (1 row(s) affected)

-- statement2

SELECT CONVERT(DateTime, FLOOR(Convert(Float, current_timestamp)))

-----------------------

2014-06-24 00:00:00.000 (1 row(s) affected)

In oracle I migrated statement1 as below

select FLOOR(TRUNC(systimestamp) - TO_DATE('01-01-1900 00:00:00', 'DD-MM-YYYY HH24:MI:SS')) from dual;

FLOOR(TRUNC(SYSTIMESTAMP)-TO_DATE('01-01-190000:00:00','DD-MM-YYYYHH24:MI:SS'))

-------------------------------------------------------------------------------                                                                         

41812 

But, don't know how to convert this value to timestamp in oracle. Please help

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2014
Added on Jun 24 2014
15 comments
739 views