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
On which interface you will be working as a developer?
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
Why do you need stage variables?
What are data elements?
Can you highlight the main features of ibm infosphere information server?
How do you import and export data into datastage?
How to reverse the string using SQL?
sed,awk,head
How to implement complex jobs in data stage?
How can you write parallel routines in datastage PX?
what is the use of materialized view?
disign the complex job in u r project?(they are aksing only complex job design and then data flow...)
Explain usage analysis in datastage?
What is the difference between in process and inter process?
What is a ds designer?