Monthly Archives: Dezember 2016
SQL Select Begin day and End day
1 2 3 4 5 6 7 8 |
DECLARE @from datetime = '12.01.2016'; DECLARE @to datetime = '12.31.2016'; DECLARE @beginDay datetime = cast (@from as DATE); DECLARE @endDay datetime = DATEADD(ms, -100, DATEADD(s, 86400, @to)); select @beginDay,@endDay |
Result: (No column name) (No column name) 2016-12-01 00:00:00.000 2016-12-31 23:59:59.900
0
Login