Page 1 of 1

How to get current timestamp in the px

Posted: Mon Feb 16, 2004 7:29 pm
by prasad9202
Could somebody help me how to get current timestamp in the px?




:?:

Posted: Mon Feb 16, 2004 8:03 pm
by ray.wurlod
Do you need it within the job, or when inserting data into a table?

If the latter, use the CURRENT_TIMESTAMP or CURRENT_DATE constant in custom SQL. (The name of the constant, and how you may need to manipulate it with a date picture, vary between databases.)

Posted: Tue Feb 17, 2004 11:39 am
by Teej
If in the job, use TimeDate() and have fun reformatting it to fit your needs.

7.x is MUCH better at handling this due to the added feature of DataStage BASIC. oconv, iconv, and all the good stuff.

-T.J.

P.S. Ray -- CURRENT_DATE? That works for Oracle too? Yay! Learned something new.

Posted: Tue Feb 17, 2004 1:20 pm
by chulett
Teej wrote:P.S. Ray -- CURRENT_DATE? That works for Oracle too? Yay! Learned something new.
It does, but it's called 'SYSDATE'.

Posted: Tue Feb 17, 2004 1:38 pm
by Teej
Aha. I already uses that in my old PL/SQL (and Pro*C once I think) stuff. Thanks for the reminder.

-T.J.