How can u convert the Date to String?

Answer Posted / samba shiva reddy . m

SELECT
GETDATE() AS UnconvertedDateTime,
CAST(GETDATE() AS nvarchar(30)) AS UsingCast,
CONVERT(nvarchar(30), GETDATE(), 126) AS UsingConvertTo_ISO8601 ;
GO
this will work for u try it out.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is full outer join in sql server joins?

732


What is ssrs?

109


How to rename databases in ms sql server?

814


Which Model uses the SET concept

743


How to truncate the log in sql server 2012? : sql server database administration

776






Is it possible to replicate data from sql server to oracle? : sql server replication

745


Can we shrink data file in sql server?

757


How can I check that whether automatic statistic update is enabled or not?

783


what are defaults? : Sql server database administration

694


What is field with example?

680


What do you understand by coalesce in sql server?

722


What is dynamic cursor in SQL SERVER?

740


What are the steps to follow to configure SQL*Net?

771


How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?

1759


What is buffer cash in sql server?

813