Results 1 to 3 of 3

Thread: using getdate() in an UDF

  1. #1
    Join Date
    Jul 2003
    Posts
    23

    using getdate() in an UDF

    Is it right, that getdate() cannot be used in an user defined function. if so, then how do i get hte current date and time in my function?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Rather than getting current date within the function using getdate(), pass getdate() value to the function.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    declare @x datetime
    set @x=getdate()
    select * from tb1 where udfdatex(@x)=1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •