Calculate the difference between two dates in hours/minutes on PDI


Currently I am parsing logs in order to optimize a PDI job, and as I need to calculate the difference between time spent in several steps Calculator step is not enough for me so I decided to use Modified Javascript:

Hope it helps

dateDiff(var1,var2,var3);
//var1: Date - The Variable with the Startdate.
//var2: Date - The Variable with the Endate.
//var3: String - The Type which represents the the return value:
// y - Years , m - Months, d - Days , w - Weeks,
// wd - Working Days ,hh - Hours ,mi - Minutes, ss - Seconds
Alert(dateDiff(date1,date2,"ss")); //Get the date diff in seconds
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s