Page 1 of 1

wierd Iconv expresion

Posted: Mon Feb 10, 2014 6:12 am
by roy
Hi All,
seen this expresion in a job:

Code: Select all

iconv(myDate,"DYMD" : @VM : "MCN")
it does return the same as:

Code: Select all

Iconv(myDate,"DYMD")
I was wondering was there something I missedd regarding Iconv
or is it simply a missused syntax (that accidentaly works) ?

Thanks,

Posted: Mon Feb 10, 2014 8:21 am
by chulett
It's not a syntax I've seen in the wild, only posted here by Ray. :wink:

The Value Mark allows you to do multiple transformations without in-lining the function call repeatedly. So it is equivalent to:

Code: Select all

IConv(IConv(myDate,"DYMD"),"MCN")
However, it makes no sense to me as "MCN" is the DIGITS transform to get only numeric values from a string and the output from IConv is already a number. So this would make more sense with OConv, which is where I've typically seen it. So you are right in that it seems to fall into the "accidentally works" category. :wink: