Thursday, August 23, 2012

Convert Numeric Value to Date Format

Suppose you are importing a flat file emp.csv and hire_date column 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.

 In expression make hire_date as input only and make another port hire_date1 as o/p port with date data type.


 In o/p port of hire_date write condition like as below


Finally send to target

2 comments:

Thank you :
- kareem