Related questions
How to print GETDATE() in SQL Server with milliseconds in time?
I want to print GETDATE() in SQL Server 2008, I need the time with milliseconds (this is for debugging purpose - to find sp's execution time )
I find this Difference
SELECT GETDATE() returns 2011-03-15 18:43:44.100
print GETDATE() returns Mar 15 2011 6:44PM
I …
Rounding SQL DateTime to midnight
I am having a small problem with my SQL query. I'm using the GETDATE function, however, let's say I execute the script at 5PM, it will pull up records between 12/12/2011 5PM to 12/18/2011 5PM. How can I make it pull up …
Incorrect syntax near ')' calling stored procedure with GETDATE
Maybe I am having a moment of 'afternoon', but can anyone explain why I get
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ')'.
When running
CREATE PROC DisplayDate
(@DateVar DATETIME)
AS
BEGIN
SELECT @DateVar
END
GO
EXEC DisplayDate GETDATE();