tChronometerStop Readable Time

tChronometerStop Readable Time

Hi Guys
Spent a while working out a way to display the Job's Duration in Hours:minutes:seconds
This is the solution I found.
tChronometerStop_1 -- On Component Ok --> tJava





The Code to work out the time from milliseconds to HH:mm:ss is below:
TalendDate.formatDate("HH:mm:ss", TalendDate.parseDate("ss", String.valueOf(((Long)globalMap.get("tChronometerStop_1_DURATION"))/1000)))

For Example:
tChronometerStop_1 puts out - 5000
After formatDate you get - 00:00:05
This can also be done by setting a startTime and endTime variable and use TalendDate.diffDate to work out the Job's duration
Regards
Brandon Smiley Happy
Community Manager

Re: tChronometerStop Readable Time

Hi Brandon
Thanks for your job and experience! Smiley Happy
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog