Cursor- Sql Server

Date Calculation in Sql Server

November 20, 2020 admin 0

Date Calculation in Sql Server Compute Total Duration in Seconds –Total number of seconds between two dates select *, DateDiff(second, StartDate, EndDate) as TotalSeconds  from Bookings ID          StartDate                    EndDate                    TotalSeconds 1           2020–01–01 06:34:12.000      2020–01–01 12:45:34.000    22282 2           2020–01–02 09:23:08.000      2020–01–02 17:05:37.000    27749 3           2020–01–03 16:34:12.000      2020–01–03 16:55:18.000    1266 4           2020–01–04 11:02:00.000      2020–01–04 14:53:21.000    13881 5           2020–01–05 07:52:55.000      2020–01–05 09:08:48.000    4553 6           2020–01–06 19:59:11.000      2020–01–07 01:23:11.000    19440 7           2020–01–07 03:12:23.000      2020–01–07 20:02:25.000    60602     Convert Above Duration […]