Query with dates

Results 1 to 2 of 2

Thread: Query with dates

  1. #1
    FretBuzzz Guest

    Default Query with dates

    My db table has a date field.<BR>How can I filter the table to display only records that hold dates of which the month part is the same as that of the system.<BR><BR>Thanks for any help<BR>Fret

  2. #2
    Join Date
    Dec 1969

    Default RE: Query with dates

    It depends a bit on which dbms you are using. Most have a function for extracting the month number for a date<BR><BR>For instance SQL server and access has the function month<BR><BR>sql = "select * from t where month(datec) = " & month(date)<BR><BR>In an ANSI sql compliant dbms the syntax is like this<BR><BR>sql = "select * from t where extract(month from datec) = " & month(date)

Posting Permissions

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