Date Conversions

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
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Date Conversions

Post by Deepakinstyle »

Hi.

i have some issues in date conversions.

i have a input file .dat which has a column calendar dt and a .txt file which has a column valuedate. i have to join these 2 column to load the data into table.
i have used stringtodate conversion for valuedate and kept the calendar dt as it is. both should have date as their datatype.
eventhough no warnings data is passing after join stage.
please let me know does calendar dt also needs a conversion? i did the same "stringtodate" but still not working.
guide me what to do.

thanks in advance,
Deepak
anil411
Premium Member
Premium Member
Posts: 53
Joined: Thu Aug 11, 2005 8:34 am

Re: Date Conversions

Post by anil411 »

Deepak,

Can you please give the Date values for the source and also how should be value in Target.

Please give the Data Types for the Calendar_dt and Value Dt.

Do you want to Concat both the date values based on key?

What should be the Data Type for the Target Column.

Thanks & Regards,
Anil
Deepakinstyle wrote:Hi.

i have some issues in date conversions.

i have a input file .dat which has a column calendar dt and a .txt file which has a column valuedate. i have to join these 2 column to load the data into table.
i have used stringtodate conversion for valuedate and kept the calendar dt as it is. both should have date as their datatype.
eventhough no warnings data is passing after join stage.
please let me know does calendar dt also needs a conversion? i did the same "stringtodate" but still not working.
guide me what to do.

thanks in advance,
Deepak
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Re: Date Conversions

Post by Deepakinstyle »

Hi Anil,

thx for the reply.
data is same for both the columns
its in mm/dd/yyyy format.

thx,
Deepak

anil411 wrote:Deepak,

Can you please give the Date values for the source and also how should be value in Target.

Please give the Data Types for the Calendar_dt and Value Dt.

Do you want to Concat both the date values based on key?

What should be the Data Type for the Target Column.

Thanks & Regards,
Anil
Deepakinstyle wrote:Hi.

i have some issues in date conversions.

i have a input file .dat which has a column calendar dt and a .txt file which has a column valuedate. i have to join these 2 column to load the data into table.
i have used stringtodate conversion for valuedate and kept the calendar dt as it is. both should have date as their datatype.
eventhough no warnings data is passing after join stage.
please let me know does calendar dt also needs a conversion? i did the same "stringtodate" but still not working.
guide me what to do.

thanks in advance,
Deepak
anil411
Premium Member
Premium Member
Posts: 53
Joined: Thu Aug 11, 2005 8:34 am

Re: Date Conversions

Post by anil411 »

Deepak,

Can you give some example.

Left_Key_val Calender_dt Right_Key_val2 valuedate
1 10/09/2007 1 10/09/2007
2 10/08/2007 2 10/07/2007


What is the output you need ? Do you want Inner join , Left Outer or Right outer Join.

Please reply.

Thanks ,
Anil


Deepakinstyle wrote:Hi.

i have some issues in date conversions.

i have a input file .dat which has a column calendar dt and a .txt file which has a column valuedate. i have to join these 2 column to load the data into table.
i have used stringtodate conversion for valuedate and kept the calendar dt as it is. both should have date as their datatype.
eventhough no warnings data is passing after join stage.
please let me know does calendar dt also needs a conversion? i did the same "stringtodate" but still not working.
guide me what to do.

thanks in advance,
Deepak
Deepakinstyle
Participant
Posts: 47
Joined: Wed Apr 18, 2007 4:49 am

Re: Date Conversions

Post by Deepakinstyle »

Hi Anil,

Cal Dt : 09/04/2007 (around 20k record woth same date)
val Dt: 09/04/2007 (1 record)

anil411 wrote:Deepak,

Can you give some example.

Left_Key_val Calender_dt Right_Key_val2 valuedate
1 10/09/2007 1 10/09/2007
2 10/08/2007 2 10/07/2007


What is the output you need ? Do you want Inner join , Left Outer or Right outer Join.

Please reply.

Thanks ,
Anil


Deepakinstyle wrote:Hi.

i have some issues in date conversions.

i have a input file .dat which has a column calendar dt and a .txt file which has a column valuedate. i have to join these 2 column to load the data into table.
i have used stringtodate conversion for valuedate and kept the calendar dt as it is. both should have date as their datatype.
eventhough no warnings data is passing after join stage.
please let me know does calendar dt also needs a conversion? i did the same "stringtodate" but still not working.
guide me what to do.

thanks in advance,
Deepak
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is your default date format string? You probably need to override it in your conversion functions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply