apply filter for date variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dbdb
    New Member
    • Feb 2009
    • 25

    apply filter for date variable

    hi guys

    need your suggestion
    how can i apply filter for my date variable data type

    i have a form name transaction
    and i have a text box on it named : start and finish

    i need to apply filter my data using that 2 data.
    i have to view data for the transaction date between start and finish date.

    i used the command button to proceed it filter.

    can u help me guys...

    thanks anyway
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    Do you mean you have two text boxes, one for start and one for finish?
    You would need to set the filter to:
    Code:
    "TransactionDate BETWEEN #" & start & "# AND #" & finish & "#"

    Comment

    • dbdb
      New Member
      • Feb 2009
      • 25

      #3
      yes....that's what i mean
      thank you.it works

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32662

        #4
        For locations outside the US it's also helpful to remember that the standard format for dates in SQL is NOT location dependent. See Literal DateTimes and Their Delimiters (#).

        Comment

        Working...