Results 1 to 3 of 3

Thread: current system date

  1. #1
    Guest
    to perform a calculation using current date in a sql select statement...date()-startdate as totdate. I get an error message saying date not a function name????

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Chicago
    Posts
    97
    The error is because you are using paranthesis beside date ie date() which tells that it is a function.Why don't you do that using DateDiff function.
    Anil

  3. #3
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    I'm not sure but maybe you could try this at home:

    Code:
    'Select all records where the date field is greather than today's date...
    Set RS=DB.OpenRecordSet("SELECT * FROM table WHERE datefield > " & Date() & " ORDER BY field")

Posting Permissions

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



Click Here to Expand Forum to Full Width