Date Comparing in Transformer

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mtechnocrat
Participant
Posts: 38
Joined: Sat Feb 28, 2004 12:11 pm

Date Comparing in Transformer

Post by mtechnocrat »

HI All

Is it possible two compare two dates in transformer , which are having the same format.
My requirement is If Get_Date < Run Date I need to insert into old file Else new file . The date format is MM/DD/YYYY HH24:MI:SS .
When the both date fields having same year this logic is working fine, if the the both date fileds having diffrent years the data was going to wrong file.

Can you help to reslove this issue ?

Thanks in advance

Krish
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In that format? No. You need to either get them both in 'YYYY-MM-DD' format or convert them to internal format (using IConv) before you compare them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mtechnocrat
Participant
Posts: 38
Joined: Sat Feb 28, 2004 12:11 pm

Post by mtechnocrat »

Thanks CHulett.
I ahve chnaged the format , now the data is going as per the logic to old file and new file.

tahnks
Krish
Post Reply