date format to timestamp

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
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

date format to timestamp

Post by harithay »

Hi all;



i have input field "DATE" in the format mm/dd/yyyy

output i need "DATE" in the format yyyy-mm-dd 00:00:00.000


i am using following format , but it is giving syntax error(showing red);

Oconv(iconv(DSLink3.DATE,'' D/MDY[2,2,4]") ,"D-YMD[4,2,2]") :" 00:00:00.000"
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You are using 2 single quotes in the first quoted string instead of a double quote.

Use:

Oconv(Iconv(DSLink3.DATE,'D/MDY[2,2,4]'),'D-YMD[4,2,2]') :' 00:00:00.000'
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Re: date format to timestamp

Post by kris »

harithay wrote:Hi all;



i have input field "DATE" in the format mm/dd/yyyy

output i need "DATE" in the format yyyy-mm-dd 00:00:00.000


i am using following format , but it is giving syntax error(showing red);

Oconv(iconv(DSLink3.DATE,'' D/MDY[2,2,4]") ,"D-YMD[4,2,2]") :" 00:00:00.000"
Here you go

Code: Select all

 Oconv(iconv(DSLink3.DATE,"D/MDY[2,2,4]") ,"D-YMD[4,2,2]"):'00:00:00.000'
you typed two single quotes instead double quote...be careful when type

Kris~
Post Reply