DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
tricampeon81
Participant



Joined: 19 Apr 2018
Posts: 19
Location: chile
Points: 169

Post Posted: Wed Jul 04, 2018 10:33 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Server
OS: Windows
Additional info: date field loses format
Friends, I have the following problem:

SELECT TO_DATE(TO_CHAR(B.START_DATE,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS') START_DATE, FROM table1

Output:
23-06-2018 13:50:56

But when you insert it in the other table it does so as:

23-06-2018

Why?

_________________
dfgdfg
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42751
Location: Denver, CO
Points: 220300

Post Posted: Wed Jul 04, 2018 3:13 pm Reply with quote    Back to top    

What is the actual target system and data type?

AFAIK, only Oracle DATE fields support a time portion, otherwise the time gets truncated. And it looks like you already have a DATE in your source so not sure why you are doing the TO_CHAR/TO_DATE dance. Especially since this is marked as a Server job. Have you tried simply moving the field from source to target without any shenanigans?

_________________
-craig

Research shows that 6 out of 7 dwarves aren't happy
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54368
Location: Sydney, Australia
Points: 294905

Post Posted: Wed Jul 04, 2018 11:30 pm Reply with quote    Back to top    

You could try setting the Data Element for that column to Timestamp.

Other than that, keep the timestamp as a string within DataStage.

_________________
RXP Services Ltd
Melbourne | Canberra | Sydney | Hong Kong | Hobart | Brisbane
currently hiring: Canberra, Sydney and Melbourne
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours