i tried but same error..kbsuryadev wrote:sorry i forgot these % in the code
try this in the derivation
StringToDate(input,"%mm/%dd/%yyyy")
and do the same in the output as i mentioned in the other reply
Converting string to date!!
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 46
- Joined: Wed Jun 06, 2007 10:32 am
Change
StringToDate(input,"%mm/%dd/%yyyy")
to this
StringToDate(input,"%mm\%dd\%yyyy")
StringToDate(input,"%mm/%dd/%yyyy")
to this
StringToDate(input,"%mm\%dd\%yyyy")
Mike Hester
mhester@petra-ps.com
mhester@petra-ps.com
its a file ..kbsuryadev wrote:what is your input ? database/file
what is the datatype.?
i just tested a job it works fine
actually iam doing column import of data coming from flat file...
Next in transformer iam trying to convert to specific date format...
is any thing i should do in column import stage for that column...
-
- Premium Member
- Posts: 46
- Joined: Wed Jun 06, 2007 10:32 am
I just did a test it works fine
i used this data
input- 03/13/2010 .. output comes as 2010/03/13
use input datatype as (varchar) -10
in the transformer use this code
StringToDate(DSLink3.DATE,"%mm/%dd/%yyyy")
Output datatype ( DATE)
go to columns tab (output stage) and edit column meta data properties window
and under parallel properties
chose format string=%yyyy/%mm/%dd
i used this data
input- 03/13/2010 .. output comes as 2010/03/13
use input datatype as (varchar) -10
in the transformer use this code
StringToDate(DSLink3.DATE,"%mm/%dd/%yyyy")
Output datatype ( DATE)
go to columns tab (output stage) and edit column meta data properties window
and under parallel properties
chose format string=%yyyy/%mm/%dd
Try to capture all the distinct values from the source by using a Remove Duplicates stage and try scanning them through to see if there are any data quality issues. We had a similar issue where business users started manually entering dates into the field and used their own formats such as 2010/03/13 (notice the slashes) or interchanged month and date positions within the date. The issue definitely looks like a data quality issue at source.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
kbsuryadev wrote:I just did a test it works fine
i used this data
input- 03/13/2010 .. output comes as 2010/03/13
use input datatype as (varchar) -10
in the transformer use this code
StringToDate(DSLink3.DATE,"%mm/%dd/%yyyy")
Output datatype ( DATE)
go to columns tab (output stage) and edit column meta data properties window
and under parallel properties
chose format string=%yyyy/%mm/%dd
It worked
Thanks for all suggestions...
Iam marking this thread resolved...