How can u convert the Date to String?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / prasad
select convert(varchar,columnname,101) from tablename
Is This Answer Correct ? | 11 Yes | 2 No |
Answer / anil singh
iN PL/SQL WE USE TO_CHAR FUNCTION
SELECT TO_CHAR(SYSDATE,'MI','HH:MM:SS' FROM TABLE NAME
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / 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 |
Answer / sivakumar
Select convert(varchar(20),getdate()) As Date
Is This Answer Correct ? | 5 Yes | 5 No |
What is the difference Between Sql-server 2000 & 2005
How to configure and test odbc dsn settings?
How to Check Whether a Global Temporary Exists in a SQL Database or not?
What is the difference between rank and dense_rank?
What is the difference between referencing and joining?
What is the difference between function and stored procedure in sql server?
What is a document index?
Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?
What is pessimistic concurrency?
Write a SQL query to make a column as unique?
What is enhanced database mirroring in sql server 2008?
What is the use of partition by in sql server?