select convert(varchar(10),GETDATE(), 103) +
' '+
right(convert(varchar(32),GETDATE(),108),8) AS Date_Time
Он будет создавать:
Date_Time 30/03/2015 11:51:40
Ответ 4
Declare @month as char(2)
Declare @date as char(2)
Declare @year as char(4)
declare @time as char(8)
declare @customdate as varchar(20)
set @month = MONTH(GetDate());
set @date = Day(GetDate());
set @year = year(GetDate());
set @customdate= @month+'/'[email protected]+'/'[email protected]+' '+ CONVERT(varchar(8), GETDATE(),108);
print(@customdate)