regarding the 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
vijaya
Participant
Posts: 15
Joined: Mon Jul 24, 2006 2:51 am

regarding the date conversion

Post by vijaya »

I am using server edition,I have to populate in my target enddate column as "2045/11/08" i enddate column datatype is timestamp i am tried aboveformat and "2045/11/08 00:01:00" but it is showing only year "2045/00/00" how can i populate the whole thing
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Vijaya,

What is ur Input Date Format and what is your Target Database and How you are converting it in the Transformer stage?
vijaya
Participant
Posts: 15
Joined: Mon Jul 24, 2006 2:51 am

Post by vijaya »

my input date format is dd/mm/yyyy and my target db is oracle and that conversion i did uing right.tag
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

Iconv and Oconv can be used for converting dates. You can use something like

Code: Select all

Oconv(Iconv(InputColumn,"D/DMY[2,2,4]"),"D-YMD[4,2,2]") : ' 00:00:00'

Use the Search facility for Iconv & Oconv, You can find N number of posts.

Thanks
DS_SUPPORT
goosarikiran
Participant
Posts: 9
Joined: Tue Jul 26, 2005 11:12 pm
Location: Bangalore

Re: regarding the date conversion

Post by goosarikiran »

Hi

You can concatenate the date with "00:00:00.000". it will be converted to time stamp.
Regards,

Kiran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No, that just adds a zero time to a given date but doesn't automagically make it a 'timestamp'. Plus you may (or in this case not) need the milliseconds you've added on.

A timestamp is a date/time in a specific format, usually ISO like so:

YYYY-MM-DD HH24:MI:SS

So there's typically more than just sticking zeroes on the end. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply