Page 1 of 1

Date function

Posted: Mon Aug 30, 2010 3:19 am
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.

Posted: Mon Aug 30, 2010 3:23 am
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.

Posted: Mon Aug 30, 2010 7:01 am
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).