try
effdate_out:date=date_from_string["%dd/%mm/%yyyy"](effdate_in)
How to convert Date format using Moify stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 99
- Joined: Mon Sep 03, 2007 7:49 am
- Location: Stockholm, Sweden
-------------------------------------
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
http://it.toolbox.com/blogs/bi-aj
my blog on delivering business intelligence using agile principles
-
- Participant
- Posts: 36
- Joined: Mon Jul 16, 2007 3:37 am
- Location: USA
How to convert Date format using Moify stage
Hi,
I am facing one problem while converting date format.First my source is a fixed width file.one of my column contain date type records, but i am reading it using char data type.My sourec is
10120/01/2007aaa
10212/12/2007bbb
metadata:
id char(3)
effdate char(10)
name char(3)
In file date is in dd/mm/yyyy format .now i have to it to datastage default format("yyyy-mm-dd").
For this i am using modify stage.I am written below logic in modify stage.
effdate_out:date=date_from_string(effdate_in,"%dd/%mm/%yyyy")
While i am runningthe job it is showing error.
Can i do it using modify stage or i have to use transformer stage.
I am facing one problem while converting date format.First my source is a fixed width file.one of my column contain date type records, but i am reading it using char data type.My sourec is
10120/01/2007aaa
10212/12/2007bbb
metadata:
id char(3)
effdate char(10)
name char(3)
In file date is in dd/mm/yyyy format .now i have to it to datastage default format("yyyy-mm-dd").
For this i am using modify stage.I am written below logic in modify stage.
effdate_out:date=date_from_string(effdate_in,"%dd/%mm/%yyyy")
While i am runningthe job it is showing error.
Can i do it using modify stage or i have to use transformer stage.
VINOD
Your specification should be:
Code: Select all
effdate_out:date=date_from_string["%dd-%mm-%yyyy"](effdate_in)
-
- Participant
- Posts: 36
- Joined: Mon Jul 16, 2007 3:37 am
- Location: USA