Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
VijayTalend
Contributor
Contributor

java logic for date time handling as per output file

Hi,

 

I am developing map using cMap and route in Talend .

 

I need the java code for splitting the date in hourly basis in output file. The dates can be from any date to any date, it can be a day or more, but we need to split it in hour basis.

 

So, If input is 2020-02-24T09:00:00;2020-02-24T11:00:00 - It should make 9 to 10 in 1st line and 10 to 11 in second line of output. Sample files are given below -

 

The input file is like below -


M1;45;2020-02-24T09:00:00;2020-02-24T13:00:00;;;W
M1;46;2020-02-24T09:00:00;2020-02-24T13:00:00;;;W
M1;47;2020-02-24T09:00:00;2020-02-24T13:00:00;;;W
M1;48;2020-02-24T09:00:00;2020-02-24T13:00:00;;;W


The output file is like below -
M1;45;2020-02-24T09:00:00;2020-02-24T10:00:00;;;W
M1;46;2020-02-24T10:00:00;2020-02-24T11:00:00;;;W
M1;47;2020-02-24T11:00:00;2020-02-24T12:00:00;;;W
M1;48;2020-02-24T12:00:00;2020-02-24T13:00:00;;;W

 

Regards

Labels (6)
0 Replies