asp.net - date difference function -


can body can teach me how use date difference function? using asp.net? please...

example

var currentdate = datetime.now; var pastdate = new datetime(2004, 06, 16); var timespan = currentdate - pastdate; int hourspassed = timespan.totalhours; 

you can subtract 1 date timespan have properties such as:


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -