Regadring Date Conversion and Comparison

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
ksv2584
Participant
Posts: 16
Joined: Wed Nov 10, 2010 6:10 am

Regadring Date Conversion and Comparison

Post by ksv2584 »

Hi

I have input column having date value with char Datatype with value in the format (yymmdd)
ex:110110

Now i need to compare with the job run date(which Iam passing as parameter in fomat yymmdd) whether the input date is greater than or equal to this date

so when converting the input value using String to date,how i nedd to pass the parameters

Please help

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

Post by chulett »

Why convert anything? That format will allow you to compare the char values directly.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

If you still feel you have to convert the dates, you can use the modify stage function date_from_string or the transformer function StringToDate, using the proper date format specifiers. All of these are documented in the Parallel Job Developer Guide included with Information Server.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply