java - Subtracting two dates with time in JSTL -


this question has answer here:

let's have 2 variables called admitteddate , currentdate. contain values

"2014-10-13 14:47:44.0" 

i want cast them dates , subtract them , show them in webpage. can help?

javascript

var differenceinmin=(new date(admitteddate ).getmilliseconds()-new date(currentdate).getmilliseconds())/60000;  var diffinhrs=differenceinmin/60;  var diffindays=parseint(diffinhrs/24)+" "+parseint(diffinhrs)+":"+((diffinhrs-parseint(diffinhrs))*60); 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -