Date function

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
balaya.ds
Participant
Posts: 27
Joined: Fri Dec 25, 2009 10:50 pm

Date function

Post by balaya.ds »

how to implement the below rule in Datastage?

i have a column "TransDate" (yyyymmdd)

yyyy should be start with "20"

mm shd be value 01 through 12.
Sudheer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you seeking an expression that will validate that this value is a valid date?

What is the data type of TransDate? Date data type does not have a format - it's stored/processed in a binary format.

Then you need to break up the date (or string?) into components and treat each separately. Use stage variables to hold the components. Test the year as being in the range 2000-2099.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:idea: Please don't post the same question twice. If you need to make a clarification, do so by editing your original post (or replying to your yourself there).
-craig

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