Results 1 to 3 of 3

Thread: Date Function

  1. #1
    Join Date
    May 2012
    Posts
    14

    Unanswered: Date Function

    Hi All, I'm stuck using date function in a Query.How do I write it down in criteria, I have to view all sold items in the previous 3 months as from 23rd April 2000

    Thanks All

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    where mydatecolumn between DateAdd ("m", -3, #04/23/2003#) and #04/23/2003#

    use the dateadd function to derive the lower limit
    Google

    use the between function to limit the rows returned
    Between...And Operator - Access - Office.com

    the only things that stand out are:-
    the between operator must have the vlaeus supplioed as between lowerlimit AND upperlimit
    the seemingly confusingly named dateadd function can take a negative value to effectivley work as "datesub"
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    May 2012
    Posts
    14
    Thanks dude it works

    Cheers

Posting Permissions

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