You shouldn't need to remove the dashes. However, since YMD is not your default locale setting, you need DYMD in the Iconv() function. Also, it's a space, not a dot, in the G conversion.
Seyed wrote:Craig,
The problem is resolved. I followed your instructions and identified that the problem was in the Iconv routine. It turns out that I had to remove dashes from the date.
ray.wurlod wrote:You shouldn't need to remove the dashes. However, since YMD is not your default locale setting, you need DYMD in the Iconv() function. Also, it's a space, not a dot, in the G conversion.
Ray,
Thank you so much for the information. I will make these changes.
Ray,
Following your comments, I didn't remove dashes. I also changed the format in the Iconv to 'DYMD' and also replaced the the decimal with a space for the 'G' function and now the resulting code works.
I found your post and it's given me hope to my similar problem, in your example you return a full month name, what if I just want an abbreviated month, so August would be Aug, and June would be Jun.
The Big Picture
My data is 20120808 and I'm trying to transform it to 08-AUG-2012.