In SQL Server 2000 Built-in nondeterministic functions were not allowed in the body of a user-defined functions (UDF). If you attempted to create a UDF that used GETDATE() you received an error similar to:
Server: Msg 443, Level 16, State 1, Procedure ufn_Getdate, Line 5
Invalid use of ‘getdate’ within a function.
In SQL Server 2005 nondeterministic Built-in functions can be used in the body of a UDF with the exception of the following Built-in functions NEWID, RAND, NEWSEQUENTIALID, and TEXTPTR.
This means that you can now use GETDATE() inside a UDF. For example:
CREATE FUNCTION dbo.ufn_Getdate()
SELECT dbo.ufn_Getdate() AS TheDate
(1 row(s) affected)