Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 11577

Re: Extract time from RunStart of a job

$
0
0

Hi Dana,

 

I guess you want to use the value in calculations. You could just take the Date, truncate day, get the millis from that and substract that value from your date/time.

 

See DateTimeZone, you have a truncateDay.

 

example:

 

 

long StartTime = j.getRunStart().getUTCMilliSecs() - j.getRunStart().truncateDay().getUTCMilliSecs();

 

 

 

Regards,

 

HP

 

Message was edited by: H-P Carpenter Sorry, I did not read the JavaDoc and first wrote truncateHour ... ;-) Truncate hour sets 13.12.2013 01:59:59 to 13.12.2013 01:00:00, which is obviously not what you want ... this is good for hourly jobs, though.


Viewing all articles
Browse latest Browse all 11577

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>