Page 1 of 1

Date formating help needed

Posted: Fri Jan 09, 2009 10:47 am
by sagar deshmukh
How to convert mm/dd/yyyy to yyyy-mm-dd in transformer stage.I dont want to use substring

Posted: Fri Jan 09, 2009 10:54 am
by chulett
First IConv() with a mask matching your input format, then OConv() on that result with a mask matching your desired ouput format.

Posted: Fri Jan 09, 2009 11:06 am
by sagar deshmukh
i did not get you, Can you please give the example of the format, am getting compilation error

Posted: Fri Jan 09, 2009 11:22 am
by chulett
What did you try? Can you post what is causing your compiler errors?

The formats are all in the online help, for example find IConv function (BASIC) in the Index, go there, scroll down to the Date Conversions section and then click on the "D" for a detailed description of that code and how it is used.

Don't forget you can inline the two functions, call one inside the other, so both easily work on the same input data.

ps. This is core Server stuff, you need to learn how to use IConv/OConv to convert your data, especially dates. I don't believe in Silver Platter answers, you'll learn more and it will stick way more better if we nudge you in the right direction and you work the rest of it out for yourself.

Posted: Fri Jan 09, 2009 11:33 am
by sagar deshmukh
Well, i got it...Some bracket missmatch happned...
evry time we have to use both Iconve and Oconv?

Posted: Fri Jan 09, 2009 11:39 am
by chulett
If you don't want to (or can't) substring, then yes you need both to go from one external representation to another.

Posted: Fri Jan 09, 2009 11:40 am
by chulett
If you're good now, please mark the post as Resolved using the button at the top of the screen.