Recently I came across a need where I had to quickly find the execution times based start_date_time and end_date_time fields and check where my job stream taking longer time to answer one of the question of my manager.. I hope this might help few others if you are in need and new to Teradata.
Select
(Job_End_date_time - Job_Start_date_time day(4) to minute) as Execution_time, Job_start_date_time, Job_End_date_time, Job_Name from <ETLJOBRUNTABLENAME>where Job_start_date_time >='2012-03-13 00:03:35' -- The time you want to filter outAnd Job_start_date_time <='2012-03-13 23:59:20' -- The time you want to filter outorder by Execution_time DescSelect
Results would look like:
Execution_time,Job_start_date_time, Job_End_date_time, Job_Name
0 00:06 3/13/2012 23:48:08 3/13/2012 23:54:06 J_XYZ
Interpreation: 0 days 0 hours 6 minutes is the execution time ot Turnaround time
select ( cast ('2012-03-13 00:03:35' as timestamp(0)) - cast ('2012-03-10 00:03:35' as timestamp(0)) day(4) to minute) as Execution_time
Results would look like:
Execution_time
1 3 00:00