How to get current timestamp in the px

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
prasad9202
Participant
Posts: 2
Joined: Tue Sep 16, 2003 7:12 am

How to get current timestamp in the px

Post by prasad9202 »

Could somebody help me how to get current timestamp in the px?




:?:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post 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.
Developer of DataStage Parallel Engine (Orchestrate).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post 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.
Developer of DataStage Parallel Engine (Orchestrate).
Post Reply