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 timestamp datatype?
write query for fourth maximum salary from employee table
14 Answers Mind Tree, SP Software,
Which tcp/ip port does the sql server run on? How can it be changed?
Can we add our custom code in ssis?
Why transaction is important?
What do you understand by check constraint in sql server?
Which stored procedure will you be running to add a linked server?
What is service broker?
Explain about extended stored procedure?
How to Create Login and User through query in Sql server 2005.and also how to delete Login and User through query?
Can we join two tables without primary key?
What is a not null constraint?