Schedule Date for Sales Order

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
parag.s.27
Participant
Posts: 221
Joined: Fri Feb 17, 2006 3:38 am
Location: India
Contact:

Schedule Date for Sales Order

Post by parag.s.27 »

Hi All,

I have to find out the day of the week for a particular schedule date. Now the problem is, the OCONV(Date(),'DW') function works fine when system date is given as an input because the Date() function returns an internal number. But i am having the schedule date comming from a source file.

I have to read date from the source file, add 30 days to it and, check the day of the week for it. if day of the week falls on weekend then postpone delivery date to next monday.

Now i'd implemented this logic with system date successfully, but the OCONV() function is not working for direct date supplied from a source file.

Can someone help me for it
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
MaheshKumar Sugunaraj
Participant
Posts: 84
Joined: Thu Dec 04, 2003 9:55 pm

Post by MaheshKumar Sugunaraj »

Hi,

You have got teh answer in your Question, You need to convert the Date from the Source file into the internal format and use the Iconv function.

OCONV(ICONV(Input date,'D-YMD'),'DW')

There have been previous posts regarding the same, please check the fourm.

Best of luck. :)

With Regards
Mahesh
kcshankar
Charter Member
Charter Member
Posts: 91
Joined: Mon Jan 10, 2005 2:06 am

Post by kcshankar »

Hi parag.s.27,
Now i'd implemented this logic with system date successfully, but the OCONV() function is not working for direct date supplied from a source file.
It should work.
can you give some more details about, your source data format, expression for conversion and output you got .



regards
kcs
Post Reply