Need to Derive the Day of the week

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
Todd P
Participant
Posts: 3
Joined: Fri Sep 01, 2006 11:53 am

Need to Derive the Day of the week

Post by Todd P »

I am in a sequencer and I need to derive the day of the week. For example, monday tuesday wednesda....etc. Can someone help me?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Welcome Mr Todd. :D

I thought there was a TAG for this, but... create a custom routine that takes a date and passes back the day of the week by name. Use OConv for this with a 'D' or Date conversion code - specifically 'DWA' to return the full day name or 'DWB' to return the 'abbreviated' day name. Drop it back to 'DW' if you ever want the day of the week number.

Edited to add: Use OConv in concert with IConv, they are typically employed in pairs. So, first IConv to convert the passed in date to an internal value and then OConv to turn that internal value into the external representation of your choice - in this case, day of the week name.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Todd P
Participant
Posts: 3
Joined: Fri Sep 01, 2006 11:53 am

Thank you . Your solution worked.

Post by Todd P »

chulett wrote:Welcome Mr Todd. :D

I thought there was a TAG for this, but... create a custom routine that takes a date and passes back the day of the week by name. Use OConv for this with a 'D' or Date conversion code - specifically 'DWA' to return the full day name or 'DWB' to return the 'abbreviated' day name. Drop it back to 'DW' if you ever want the day of the week number.

Edited to add: Use OConv in concert with IConv, they are typically employed in pairs. So, first IConv to convert the passed in date to an internal value and then OConv to turn that internal value into the external representation of your choice - in this case, day of the week name.
Todd P
Participant
Posts: 3
Joined: Fri Sep 01, 2006 11:53 am

Thank you . Your solution worked.

Post by Todd P »

chulett wrote:Welcome Mr Todd. :D

I thought there was a TAG for this, but... create a custom routine that takes a date and passes back the day of the week by name. Use OConv for this with a 'D' or Date conversion code - specifically 'DWA' to return the full day name or 'DWB' to return the 'abbreviated' day name. Drop it back to 'DW' if you ever want the day of the week number.

Edited to add: Use OConv in concert with IConv, they are typically employed in pairs. So, first IConv to convert the passed in date to an internal value and then OConv to turn that internal value into the external representation of your choice - in this case, day of the week name.
Post Reply