Mark,
You dont need to go to all that trouble. Simply use Iconv(TheDate, "DYMD") where YMD asserts that the input date is in year, month, day order.
Ray
> ----------
> From: Mark Detwiler[SMTP:
mark@msdetwiler.com]
> Reply To:
informix-datastage@oliver.com
> Sent: Saturday, 16 September 2000 18:35
> To:
informix-datastage@oliver.com
> Subject: Re: iconv statement
>
> Seema,
>
> You may need to write your own routines
> yourself in Manager. I move date columns
> to and from Unidata (similar to UV) from
> Oracle and Informix a lot. For Oracle
> timestamps I take a substring. The
> format is yyyy-mm-dd 00:00:00 so X=timestamp[1,10]
> then Iconv the result using Iconv(X,"D").
>
> I Iconv Informix dates that seem to come in DS in the
> format of YYYY/MM/DD. I have to rearrange the
> date string as X=date[6,2]:"/":date[9,2]:"/":date[1,4]
> to get it a MM/DD/YYYY format then Iconv the result
> to Internal format.
>
> Im not on SQL Server but my point is you may have
> to treat the date as a string, cut it up, and rearrange
> it before you Iconv it to an internal integer format.
>
> Im running DS version 4.01 and some of the vendor
> supplied routines did not work for me so I wrote my own.
>
> Hope this helps
>
> Mark Detwiler
> Detwiler Consulting
> mailto:
mark@msdetwiler.com
>
> -----Original Message-----
> From: Seema Ranchoddas
> To:
informix-datastage@oliver.com
> Date: Wednesday, September 13, 2000 9:27 AM
> Subject: iconv statement
>
>
> I am trying to convert a timestamp from SQL Server to uv in internal
> format. I am using the iconv statement with the d conversion but it
> doesnt seem to work. Does anyone know what the correct conversion is?
>
> Seema
>
>
>