how do u convert date in 20-12-07 to dec-20-2007 or 20-dec-
2007 or 20-dec-07 in parallel

Answer Posted / shar

First see what is the default date format of the project.
Generally it would be “%yyyy-%mm-%dd”
Then u need to change it to ur required format like :
“%dd-%mm-%yy”
Since the year is 2 digit year then u will have to mention
its four digit year before yy because datastage cannot
understand the latest and old year and it simply consider
year from 1900 century on wards.
So u will have to mention at ur job properties under default
at date as : “%dd-%mm-%2000yy” (must) without which
datastage will not consider u r given date format in
transformer stage date function and it simply go with the
Project’s default date format.
And also mentioning “%dd-%mm-%2000yy” format at job
properties and not mentioning “%dd-%mm-%2000yy” at
transformer stage also works fine.
Ex: if your date is (20-12-07,”%dd-%mm-%yy”) then datastage
consider default date format at job properties and will go
accordingly. And output will be 20-12-2007. And if
“%dd-%mm-%yy” is mentioned at job properties and u have
mentioned (20-12-07,”%dd-%mm-%2000yy”) then datastage will
not consider ur date format and simply it gives the output
as 1907-12-20.
So it is a good practice to see the default date format
assigned to the project and make changes accordingly and
attempt to do the process with it.
DateToString(StringToDate(DSLink3.date,"%dd-%mm-%2000yy"),"%mmm-%dd-%yyyy")
- dec-20-2007
DateToString(StringToDate(DSLink3.date,"%dd-%mm-%2000yy"),"%dd-%mmm-%yyyy")
-20-dec- 2007
DateToString(StringToDate(DSLink3.date,"%dd-%mm-%2000yy"),"%dd-%mmm-%yy")
- 20-dec-07

Now That’s what I call it cooooll.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

On which interface you will be working as a developer?

629


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

1913


Why do you need stage variables?

652


What are data elements?

651


Can you highlight the main features of ibm infosphere information server?

633






How do you import and export data into datastage?

693


How to reverse the string using SQL?

884


sed,awk,head

961


How to implement complex jobs in data stage?

608


How can you write parallel routines in datastage PX?

611


what is the use of materialized view?

954


disign the complex job in u r project?(they are aksing only complex job design and then data flow...)

2071


Explain usage analysis in datastage?

644


What is the difference between in process and inter process?

661


What is a ds designer?

636