Results 1 to 2 of 2

Thread: visual foxpro 6

  1. #1
    Join Date
    Aug 2008

    Unanswered: visual foxpro 6

    First I am not a programer
    I have a database that has a field called docdate2 - it is a date field. I am trying to get a count of records between two date (example 1/1/06 and 12/31/06)
    Does anyone have any ideas what command I would type to do this?

  2. #2
    Join Date
    Nov 2002
    Provided Answers: 1
    There are a variety of ways to get a count of records.

    One approach would be to run the COUNT command on your data table (note - not 'database'):
    SELECT MyTable
    COUNT docdate2 TO mnRecCount WHERE BETWEEN(docdate2, CTOD("01/01/2000"), CTOD("02/15/2008"))

    You should spend some time with the VFP Help window learning about the command & functions:

    You can also consider using a SQL Query to get your count of records.
    SELECT COUNT(docdate2) FROM MyTable WHERE BETWEEN(docdate2, CTOD("01/01/2000"), CTOD("02/15/2008")) INTO CURSOR RecCnt

    Good Luck

Posting Permissions

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