Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Posts
    4

    Unanswered: select records with expiry date = current month (was "Simple SQL question...")

    I have a database that contains a field 'ExpiryDate' in format dd/mm/yyyy. I need to write an sql statement to select records with expiry date = current month

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Depends on your RDBMS. Something like:

    Code:
     
    SELECT * 
    FROM MyTable
    WHERE Month(ExpiryDate) = Month(Date()) AND Year(ExpiryDate) = Year(Date())
    might do it
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    May 2013
    Posts
    1

    Thumbs up

    Thanks Pootle Flump

    Even though it was posted ages ago was just what I needed.

Posting Permissions

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