Page 1 of 1

What am I doing wrong?

Posted: Wed Nov 28, 2012 4:08 am
by SettValleyConsulting
So I have a sequential file with dates in the form 2012-11-25. On the format tab of the sequential file I set the format string for dates to be %yyyy-%mm-%dd.

The help text for this property is
'The string format of a date. By default, the format of the date string is %yyyy-%mm-%dd.
reinforced by the online help:
When you specify a date format string, prefix each component with the percent symbol (%) and separate the string's components with a suitable literal character.

The default date_format is %yyyy-%mm-%dd.
so I should be pretty safe, no? Well the job throws this warning
sq_StatsFiles: When validating import schema: Unrecognized top level format property: date_format="%yyyy-%mm-%dd"
This has been asked before but the thread fizzled out without a resolution, anyone seen this behaviour? What's wrong with my format string?

TIA

Re: What am I doing wrong?

Posted: Wed Nov 28, 2012 11:15 pm
by satishmailbox
may be try specifying at column level (double click next to column name) not at stage level

Re: What am I doing wrong?

Posted: Thu Nov 29, 2012 4:32 pm
by SURA
I will read it as Varchar.

Posted: Mon Dec 03, 2012 3:12 am
by abhijain
It would be good, if read it as VARCHAR first and then convert into Date format using Datastage function using

StringToDate(InputString,"%yyyy-%mm-%dd")