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
How to enter date and time literals in ms sql server?
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
How to create new tables with "create table" statements in ms sql server?
What is difference between view and materialized view?
List out the differences between global and local temp tables in sql server?
What is the Control Flow in SSIS
What are the different types of cursor?
Do you know what is a trace frag? Where do we use it?
How to update values in a table with update statements in ms sql server?
what is checksum in sql server.........???
Is sql server a database?
Mention the differences between substr and charindex in sql server.
what is a default tcp/ip socket assigned for sql server? : Sql server database administration
What is the difference between ddl,dml and dcl commands?
What do you understand by triggers?