How to concatenate two dates of type DateTime
, one of which may have its value equal to NULL , I'm trying as follows;
DECLARE @DATA1 DATETIME = GETDATE(), @DATA2 DATETIME
select Convert(nvarchar(50),@DATA1 , 121) +'|'+ Convert(nvarchar(50), @DATA2, 121)
But this returns null
, when in fact I wanted the value of GETDATE () + something like empty or null.