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 are the advantages of policy management?
What is the syntax to execute the sys.dm_db_missing_index_details?
Why union all is faster than union?
How to transfer data from a cursor to variables with a "fetch" statement?
What is normalization? What number of normalization shapes are there?
How to set the current database in ms sql server?
What is cube dimension? : sql server analysis services, ssas
What is the use of “join” in sql server?
What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is Primary key and foreign key? Give an example
What do you mean by collation recursive stored procedure?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)