If this is going to be commonly used, you may want to create a
User Defined Function to take care of this.
This example will return the last second of the date you entered
CREATE FUNCTION [dbo].[EndOfDay] (
@DateText Char(8)
)
RETURNS DateTime
AS
BEGIN
RETURN DateAdd(Ss, 86399, Convert (DateTime, @DateText, 4))
END
GO
You could then call this function using this standalone query
SELECT dbo.EndOfDay('27.11.19')
And in the query you provided you could use it in your declaration statement
DECLARE @fromdate datetime = Convert (datetime, '27.11.19', 4)
, @todate datetime = dbo.EndOfDay('27.11.19')