Get Current System Date Time

Answers were Sorted based on User's Feedback



Get Current System Date Time..

Answer / mohammadali.info

SELECT GETDATE() AS CurrentDateTime

SELECT 'SYSDATETIME' AS FunctionName, SYSDATETIME() AS DateTimeFormat
UNION ALL
SELECT 'SYSDATETIMEOFFSET', SYSDATETIMEOFFSET()
UNION ALL
SELECT 'SYSUTCDATETIME', SYSUTCDATETIME()
UNION ALL
SELECT 'CURRENT_TIMESTAMP', CURRENT_TIMESTAMP
UNION ALL
SELECT 'GETDATE', GETDATE()
UNION ALL
SELECT 'GETUTCDATE', GETUTCDATE()

Is This Answer Correct ?    4 Yes 0 No

Get Current System Date Time..

Answer / ahamed razik

select getdate()

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Which sql server table is used to hold the stored procedure script?

0 Answers  


in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

0 Answers  


What are the instances when triggers are appropriate?

0 Answers  


you are provided with the single table having say 4 col ie fname lname age city , now the all records with displying of only fname and lname is required but in this format say my name is abhay khanna it will come like this abhay-khanna rahul-roy gaurav-singh the above format is required

3 Answers  


What about UPDATESTATISTICS ?

2 Answers   HCL, Intelligroup,






Do comments need to go in a special place in sql server 2005?

0 Answers  


Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?

2 Answers  


How self join is different from outer join?

0 Answers   Blue Star,


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

0 Answers  


Define indexes?

0 Answers  


What is sql stored procedure?

0 Answers  


How do I clean up sql server transaction log?

0 Answers  


Categories