Results 1 to 2 of 2

Thread: Dates

  1. #1
    Join Date
    Dec 1969

    Default Dates

    I have a field named "DDate" in my database where default value equal to "=Now()" so it will generate the date and time for new records. I tried to get the sum of record on yesterday. so i wrote:<BR><BR>sqlCount = "select count(subject) as yesterday from table where DDate = (now()-1)"<BR><BR>it returns zero meaning that is no record but it&#039;s not. i think the sql is comparing the time too, which is not required in this case... My question is, how can I campare the date without camparing the time in this field? (I need the time for other purpose... so there&#039;s no way to change the format into short date)<BR><BR>I hope my question is clear enough,<BR>Please Help!!

  2. #2
    BAM Guest

    Default RE: Dates

    Try using the format date function:<BR>formatdate(now(),1) - 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