Page 1 of 1

convert string YYYYMM to date format

Posted: Tue Nov 16, 2010 5:09 am
by Aggie99
I have a string "201009" which is YYYYMM format.

I need to convert it to two different formats:

Sept, 2010 and September, 2010 to be used in report titles.


Can someone show me how in the Transformer stage ?

thanks!

Posted: Tue Nov 16, 2010 6:14 am
by ArndW
3 stage variables:

Code: Select all

svYearValue  In.DateString[1,4]
svMonthValueShort  FIELD('Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec',',',In.DateString[5,2])
svMonthValueLong  FIELD('January,February,March,April,May,June,July,August,September,October,November,December',',',In.DateString[5,2])
Then construct your output string using your required format(s) and the 3 stage variables, i.e. "svMonthValueShort:', ':svYearValue"

Posted: Tue Nov 16, 2010 7:28 am
by Aggie99
thank you.