Hi,
i am getting the source date field data like "15299 "and small int as datatype and want to convert to date format (yyyy-mm-dd).How can i convert .Which function i will use.Can you provide the whole function syntax.
date conversion from small int
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
Two places in the documentation to help jumpstart the thinking process:
http://publib.boulder.ibm.com/infocente ... tions.html
http://publib.boulder.ibm.com/infocente ... tions.html
Regards,
http://publib.boulder.ibm.com/infocente ... tions.html
http://publib.boulder.ibm.com/infocente ... tions.html
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 353
- Joined: Mon Jan 17, 2011 5:03 am
- Location: Mumbai, India
As asked above you need to find the "Day 0" value.
Mostly it is generic but sometimes project specific like in my project its 1899-12-31.
So once you find it you can use any of the below functions :-
If you are having a database as your source.
If you want to do it in transformer.
Also do a Null handling in the transformer if you are using 2nd option, because the record will drop from the transformer if Null comes in the source.
Mostly it is generic but sometimes project specific like in my project its 1899-12-31.
So once you find it you can use any of the below functions :-
Code: Select all
date('1899-12-31') + n days
Code: Select all
DateFromDaysSince(<column>,'1899-12-31')
Also do a Null handling in the transformer if you are using 2nd option, because the record will drop from the transformer if Null comes in the source.
Thanx and Regards,
ETL User
ETL User