How can u convert the Date to String?
Answer Posted / rajesh ranjan
select cast(getdate() as varchar)
select convert(varchar,getdate(),101)-mm/dd/yyyy
select convert(varchar,getdate(),102)-yy.mm.dd
select convert(varchar,getdate(),106)-ddmmyy
select convert(varchar,getdate(),108)-hh:mm:ss
etc.
| Is This Answer Correct ? | 18 Yes | 2 No |
Post New Answer View All Answers
What is transaction server consistency?
What is buffer cash in sql server?
What are pages and extents? : SQL Server Architecture
How to recompile stored procedure at run time?
What are the limitations/drawbacks or ssrs 2008 r2?
How to create new databases with "create database" statements?
If no size is defined while creating the database, what size will the database have?
How you can move data or databases between servers and databases in sql server?
You want to implement the one-to-one relationship while designing tables. How would you do it?
How can we check the sql server version?
What is the difference between a clustered index and a non-clustered index?
Which language is supported by sql server?
What is a unique index?
What are sp_configure commands and set commands?
Introduction of rollup clause using sum and group by clause?