Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    1

    Unanswered: Get results from query

    Hi
    I have a table as attached where one column is with 3months starting dates and one column get 3month periods by using

    Format$([First Date of 3month period],"\Qq yyyy",0,0) AS TreMonth


    How to make it so I can show data for 6 month period?
    Regards
    Attached Thumbnails Attached Thumbnails Untitled.jpg  

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use the (possibly confusingly named) dateadd function to set the lower threshold

    eg
    select my, column, list
    from mytable
    where mydate column > dateadd("m",-6,date())

    or the datediff function
    where datediff("m", mydatecolumn, date()) <=6
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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