Hi All,
Kindly guide me for the below problem.
I need to substract a day from to date and carry the value for further processing.Pls help me out.
input format of date:
DATE_TO=18/02/2010
D1=Iconv(DATE_TO, "D2/")
D2=D1-1
TSTAMP1 = oconv(D2,"DDMY[2,2,4]")
DD = TSTAMP1[1,2]
MM = TSTAMP1[4,2]
YYYY = TSTAMP1[7,4]
FILEDATE = DDMMYYYY
Tried above but not getting the right value for FILEDATE.
FILEDATE EXPECTED:17022010
Thanks in Advance,
Harsha
Reduce date by a day in job control
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 10
- Joined: Tue Jun 19, 2007 1:16 am
- Location: Bangalore
Perhaps just?
You could also simply use Convert() to remove any delimiters that OConv() added to the date rather than chopping it up and reassembling it.
Code: Select all
FILEDATE = DD : MM : YYYY
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 10
- Joined: Tue Jun 19, 2007 1:16 am
- Location: Bangalore
chulett wrote:Perhaps just?You could also simply use Convert() to remove any delimiters that OConv() added to the date rather than chopping it up and reassembling i ...Code: Select all
FILEDATE = DD : MM : YYYY
Hi,
Tried the above but it's not working to the expectation.
Thanks in Advance.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Exactly, simply saying something is "not working" doesn't help anyone help you.
Make liberal use of the DSLogInfo() function to log your intermediate values if you are unsure where exactly things are going wrong. That or use the Manager to test your job and tweak it to pass back more than just your 'Answer' while you debug it.
![Confused :?](./images/smilies/icon_confused.gif)
Make liberal use of the DSLogInfo() function to log your intermediate values if you are unsure where exactly things are going wrong. That or use the Manager to test your job and tweak it to pass back more than just your 'Answer' while you debug it.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers