Page 1 of 1

Formatting dates question

Posted: Tue Jan 10, 2006 3:25 pm
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

Posted: Tue Jan 10, 2006 3:29 pm
by jzparad
Isn't this just a string concatenation?

Posted: Tue Jan 10, 2006 3:31 pm
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

Posted: Tue Jan 10, 2006 3:54 pm
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")