Sunday, January 20, 2013

Convert Numeric to Date format

Suppose you are importing a flat file emp.csv and hire_date colummn is in numeric format, like 20101111 .Our objective is convert it to date,with a format 'YYYYMMDD'.
source
  EMPNO       HIRE_DATE(numeric)         
  -------            -----------
     1                20101111
     2                20090909

target
EMPNO            HIRE_DATE (date)        
 ------                   -----------
     1                 11/11/2010
     2                 09/09/2009

1.        Connect SQF to an expression.



2.       In expression make hire_date as input only and make another port hire_date1 as o/p port with date data type.
3.       In o/p port of hire_date write condition like as below

4.       Finally send to target

No comments:

Post a Comment

Thank you :
- kareem