Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    Colbert, Georgia, USA
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Use of Between...And (A2002 SP3)

    Good afternoon:
    I have a problem that I know was addressed here in the past but I can

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Use of Between...And (A2002 SP3)

    If the dates in the table are pure dates without a time component, Between [Start Date] And [End Date] will include both the Start Date and the End Date and everything in between. However, if the dates in the table contain a time component (which may not be displayed due to the way the field is formatted), you have a problem, because a date without a time (the End Date) is interpreted as midnight at the start of that date. One possible workaround is to create a calculated column

    WholeDate: Int([Datefield])

    in the query, where DateField is the name of the date field, and to place the criteria in this column.

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Location
    Colbert, Georgia, USA
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of Between...And (A2002 SP3)

    Thank you, Hans. The date field does have a time component. I thought there should be some way to get rid of it, but I didn't have a clue how to approach it. I appreciate your help.

    don

  4. #4
    New Lounger
    Join Date
    Oct 2002
    Location
    Colbert, Georgia, USA
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Use of Between...And (A2002 SP3)

    Edited by HansV because Lounge software interprets <!t>[tr...]<!/t> as a table row tag.

    Hans: I thought I understood your response to my initial query 'completely.' But I am having a problem. In my query for the report I have created a column:
    WholeDate: Int(<!t>[TransactionDate]) -- <!t>[TransactionDate] being the field of interest.
    In the criteria for this column I have: Between [Enter Begin Date] And [Enter End Date]

    My results are 'NO DATA for this date range'. In trying to determine what I was missing, at one point the output was every record in the Table. All or nothing at all.

    I would appreciate any suggestion(s).

    Thank you.
    don

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Use of Between...And (A2002 SP3)

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

Posting Permissions

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