2017-10-25 [.NET]取得兩個DateTime之間的差異秒數(diff) 194 0 [.NET]取得兩個DateTime之間的差異秒數(diff) var diffInSeconds = (dateTime1 - dateTime2).TotalSeconds; 參考資料: Check difference in seconds between two times .NET 回首頁