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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to insert the current datetime (pl/sql)

hasilvaMar 23 2015 — edited Mar 23 2015

Hello everyone,

I wanna insert the current date and time on the database after my application has started the stored procedure.

I have to insert the following format for datetime column: 03/19/2015 00:00:00 (that is, MM/DD/YYYY XX:XX:XX AM/PM)

Is it correct to use this line?

TO_DATE(SYSDATE, 'MM/DD/YYYY HH24:MI:SS')

---

My SYSDATE example:

SELECT SYSDATE from DUAL;

3/19/2015 5:43:37 PM

My stored procedure script are attached and my Oracle version is 10g.

Best regards,

Henrique Silva

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2015
Added on Mar 23 2015
5 comments
3,406 views