June 24, 2009 at 9:59 pm
hey hi
anybody knows how do i insert the current DateTime into a SP?
it seemed SYSDATETIME is not recognise built-in function name.
DECLARE @livedate DATETIME;
Insert into tb1 (ErrorDate)
values(@livedate);
select CONVERT (date,SYSDATETIME());
June 24, 2009 at 10:07 pm
mehmel (6/24/2009)
hey hianybody knows how do i insert the current DateTime into a SP?
it seemed SYSDATETIME is not recognise built-in function name.
DECLARE @livedate DATETIME;
Insert into tb1 (ErrorDate)
values(@livedate);
select CONVERT (date,SYSDATETIME());
First, what stored procedure? There isn't one above.
Second, the code above should look like this:
DECLARE @livedate DATETIME;
SET @livedate = getdate();
Insert into tb1 (ErrorDate)
values(@livedate);
June 24, 2009 at 11:28 pm
was going to put it in the SP. Thanks, it works!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply