Previous day in User variable activity

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
nandela.sudheer
Participant
Posts: 39
Joined: Mon May 19, 2008 7:22 am

Previous day in User variable activity

Post by nandela.sudheer »

I want the Previous day of sysdate logic in User variable activity stage in job sequence.Please help me.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

@DATE - 1
or

Code: Select all

Date() - 1
This gives yesterday's date in DataStage internal format. To convert to human-readable format use Oconv() function. For example

Code: Select all

Oconv(@DATE - 1, "D-YMD[4,2,2]")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nandela.sudheer
Participant
Posts: 39
Joined: Mon May 19, 2008 7:22 am

Post by nandela.sudheer »

Please explain with one example.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

He did. Which part is unclear? There are plenty of examples of OConv() syntax here or in the documentation if that is an issue.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply