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 |
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
Which command displays the SQL command in the SQL buffer, and then executes it?
What is create command?
How can you control the amount of free space in your index pages?
Explain temporary table vs table variable by using cursor alternative?
What are the lambda triggers?
i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution?
I have a table emp , Fields with empname,dnname,dno,salary. now I want copy distinct salary with all emp detail from emp into new table which is not already exist in database. how would I do this ?
What are the difference between primary keys and foreign keys?
What happens if the update subquery returns multiple rows in ms sql server?
What is row_number function?
What does indexation mean?