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
What is a merge in datastage?
What are the different common services in datastage?
How do you generate sequence number in datastage?
How many types of sorting methods are available in datastage?
Does datastage support slowly changing dimensions ?
What are the steps required to kill the job in Datastage?
What are constraints and derivations?
Nls stands for what in datastage?
Explain the situation where you have applied SCD in your project?
How do you start developing a datastage project?
Can you filter data in hashed file?
Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?
How do you schedule or monitoring the job?
how can we create rank using datastage?what is the meaning of rank?
What are the functionalities of link collector?