![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I m trying to write a function that calculates date difference as follows: ALTER FUNCTION dbo.daycount(@startday DateTime) RETURNS Integer AS BEGIN DECLARE @enddate DateTime set @enddate = GetDate() RETURN DATEDIFF(day, @startday, @enddate) END keeps saying I can't use GetDate(). Can someone tell me what's wrong with this? -- axism |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |