I am getting this error while converting stringtodate. source is .csv file and datatype is varchar have to keep date in oracle target.
using the ds version 8.1
I am using the code: StringToDate(SRC.DATE,'%mm/%dd/%yyyy')
getting resulet like **************
APT_CombinedOperatorController,0: Data string '11/2/2007' does not match format '%mm/%dd/%yyyy': the value for tag %dd has fewer characters than expected.
any advise!
StingtoDate
Moderators: chulett, rschirm, roy
I had that issue a while back and had to use the length and an IF THEN ELSE clause with two different pictures for the date. I vaguely recall having seen someone post a format that accepts variable length date components but am not sure - I do know that it isn't documented.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 152
- Joined: Tue Jan 13, 2009 8:59 am
Re: StingtoDate
using this format would solve the issue
Code: Select all
StringToDate(SRC.DATE,'%m/%d/%yyyy')
-
- Participant
- Posts: 152
- Joined: Tue Jan 13, 2009 8:59 am
Re: StingtoDate
using this format would solve the issue
Code: Select all
StringToDate(SRC.DATE,'%m/%d/%yyyy')
Re: StingtoDate
what is the format i can use if i need to keep the date like 19 sep 2008.
What do you mean 'keep the date'? A date is a date and is stored in an internal representation, only external (string) formats have display options like that. So use whatever mask matches the incoming date format in the StringToDate function.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers