Concatenate today's date and tomorrow's date

  • I have to Concatenate today's date and tomorrow's date in the below format using T-SQL.

    2012.04.21.12.04.22

    Please help me out on this.

    Thanks in advance

  • Which of the following do you want?

    select CONVERT(varchar(10), getdate(), 102) + '.' + CONVERT(varchar(10), dateadd(dd,datediff(dd,0,getdate()) + 1,0),2);

    select CONVERT(varchar(10), getdate(), 102) + '.' + CONVERT(varchar(10), dateadd(dd,datediff(dd,0,getdate()) + 1,0),102);

  • Thanks Lynn

  • You gave me the solution,as i need the 1st Select Statement.

    I Thank you again.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply