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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi Brandon
Thanks for your job and experience! Smiley Happy
Best regards
Shong