c# - Can I find total time of 1st time and 2nd time in DATETIME? -


i find total time of 2 datetime. have 2 datetimes: logindt , logoutdt. logindt database , logoutdt now. code below

datetime logindt = (datetime)readers["login_date_time"]; datetime logoutdt = datetime.now; datetime total = ?????????????? 

how should do? all

time intervals in c# measured timespan structure. can substracting 2 datetime variables:

datetime logindt = (datetime)readers["login_date_time"]; datetime logoutdt = datetime.now; timespan total = logoutdt - logindt; 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -