Page 1 of 1

Date Conversion

Posted: Mon Feb 18, 2008 9:06 am
by Pk39565
I wanted to convert the date 2008-01-21 23:59:59 into 2008-01-21
in datastage server edition.

Thanks in advance

Posted: Mon Feb 18, 2008 9:27 am
by ArndW

Code: Select all

In.DateColumn[1,10]
should do the trick.

Posted: Mon Feb 18, 2008 9:47 am
by Pk39565
Ur asking me take substring...


I have done with substring but it's not working.

Posted: Mon Feb 18, 2008 10:00 am
by kcbland
If there is an error message, please post it. If not, please write output to a Sequential file stage and look at the result there. I suggest you write a column of the source data as-is and another column of the date using the substring notation.

Posted: Mon Feb 18, 2008 10:11 am
by chulett
What is not working about it? The substring operator as posted will do exactly as you said you needed. :?

Posted: Mon Feb 18, 2008 11:45 am
by ArndW
I think I answered your question, but not your problem. It would seem that the column does not contain what you think. Is it a string or do you use OCONV() somewhere? If you were to post the problem and result you will get an answer, otherwise nobody here will be able to guess what is happening with your data on your machine.