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 you can get a list of all the table constraints in a database?
What is log ldf?
What does it mean to normalize data?
What is a system database and what is a user database?
What are sp_configure commands and set commands?
Explain the difference between clustered and non-clustered index?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
What is the syntax to execute the sys.dm_db_missing_index_details?
What is the difference between stored procedure and user defined functions?
What is the purpose of linked server configuration in sql server?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
What is extent? Types of extents?
Which autogrowth database setting is good?
How can you set the threshold at which sql server will generate keysets asynchronously?
How to apply cascading referential integrity in place of triggers?