Formatting dates question

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
rdy
Participant
Posts: 38
Joined: Wed Nov 05, 2003 2:40 pm

Formatting dates question

Post by rdy »

Anyone know the code to turn a Timestamp that looks like this:

2005-05-29

Into this:

2005-05-29 00:00:00.000
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post by jzparad »

Isn't this just a string concatenation?
Jim Paradies
rdy
Participant
Posts: 38
Joined: Wed Nov 05, 2003 2:40 pm

Post by rdy »

jzparad wrote:Isn't this just a string concatenation?
Well I was trying to actually get the time portion. If you mean just concatenating the string '00:00:00.000' in this example, that wouldn't fit the requirements.

(Guess I need to be more specific :D
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

There are no time elements to dates as Server has no data typing enforced, everything is a string. Therefore, any value of 2005-12-31 is just a text string inside DataStage.

If you're asking from an SQL perspective, I suggest you specify in your SQL the format of date/time values. In Oracle, it would be to_char(yourdate, "YYYY-MM-DD HH24:MI:SS")
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
Post Reply