Page 1 of 1

ICONV 12-hour format Time Conversion

Posted: Tue Nov 06, 2007 9:07 pm
by vaby
What am I doing wrong? The following two conversions return the same internal value:

X=ICONV("3:14 AM", "MTH") X=11640
X=ICONV("3:14 PM", "MTH") X=11640

I can do this conversion in SQL, but would prefer to have all such type transformations inside DataStage. Any help is appreciated. This should be simple, right?

Vladimir

Posted: Tue Nov 06, 2007 9:28 pm
by chulett
From what I recall, it doesn't like the space before the AM or PM when doing 12-hour format conversions. Try removing it and rerunning your tests.

Posted: Tue Nov 06, 2007 9:36 pm
by vaby
You right, many thanks!

X=ICONV("3:14AM", "MTH") X=11640
X=ICONV("3:14PM", "MTH") X= 54840

Vladimir