I searched but wasn't able to find the way to get the date in this format (DD.MM.YYYY) Help me please change this request:
DECLARE @date datetime
set @date = '01.05.2016'
SELECT [User], cast(DATEADD(SECOND, sum(datediff(DAY, @date,[Start])),@date) as date)'Date'
,cast(DATEADD(SECOND, sum(datediff(SECOND, '00:00:00',[Period])),'00:00:00') as time)'Total time'
FROM [Table].[TableAction]
where
[Start] >= @date+'00:00:00' and [Start] <= @date+'23:59:59'
group by [USER]
DECLARE @date datetime set @date = GETDATE()
Now to output it, you need to "Format" it.
select FORMAT (@date,'MM.dd.yy') as date

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With