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 |
Explain the difference between functions and stored procedures in sql server?
How can we call UDF(User Define Function) using C# code in ASP.net ?
Wht is SQL Injection Attack ?
What is the query optimization statistics?
What is a scheduled job or what is a scheduled task?
What is shared lock?
Explain the use of keyword with encryption. Create a store procedure with encryption?
What are the difference between “where” and “having” clause in sql server?
How to create new tables with "create table" statements in ms sql server?
What are the advantages of using third-party tools?
Tell me about joins in database system and explain each in detail.
0 Answers Axtria, ITC Indian Tobacco Company,
Explain various data region available in ssrs with their use?
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)