[resolved] HELP - HOW TO Quarter IN MY TMAP

Highlighted
Five Stars

[resolved] HELP - HOW TO Quarter IN MY TMAP

Dear all,

I am making transformation in my tMap, and i have a column of date type, so i want to get output data each quarter of the reference date
For exemple:
INPUT DATA
Date (MM/dd/yyyy) ;  Info
03/16/2014        ;  Hello world

OUTPUT DATA         
Date (MM/dd/yyyy) ;  Info
03/16/2014        ;  Hello world
06/16/2014        ;  Hello world
09/16/2014        ;  Hello world
12/16/2014        ;  Hello world
03/16/2015        ;  Hello world
..................
...............

Thank you for help,


Accepted Solutions
Community Manager

Re: [resolved] HELP - HOW TO Quarter IN MY TMAP

Hi
Take a look at this built-in function: TalendDate.addDate(Date yourDateColumn, int  nb, String datePart). In this case, you need to add 3 in the month part. 
TalendDate.addDate(row1.dateColumn, 3, "MM")
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

View solution in original post


All Replies
Community Manager

Re: [resolved] HELP - HOW TO Quarter IN MY TMAP

Hi
Take a look at this built-in function: TalendDate.addDate(Date yourDateColumn, int  nb, String datePart). In this case, you need to add 3 in the month part. 
TalendDate.addDate(row1.dateColumn, 3, "MM")
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog