Date Conversion

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Pk39565
Premium Member
Premium Member
Posts: 34
Joined: Tue Dec 25, 2007 12:03 am
Location: Brisbane

Date Conversion

Post 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
Praneet
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Code: Select all

In.DateColumn[1,10]
should do the trick.
Pk39565
Premium Member
Premium Member
Posts: 34
Joined: Tue Dec 25, 2007 12:03 am
Location: Brisbane

Post by Pk39565 »

Ur asking me take substring...


I have done with substring but it's not working.
Praneet
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post 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.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What is not working about it? The substring operator as posted will do exactly as you said you needed. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Post Reply