add one hour to column in sql via vb6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kbbauman
    New Member
    • Nov 2009
    • 6

    add one hour to column in sql via vb6

    I have a database in access that I am trying to pull in and add 1 hour to a specific column [datetime field]. here is what i have so far...

    Data1.RecordSou rce = "Select * from [table] where[column]+ #01:00:00 AM#"
    Data1.Refresh

    error says "date + date not allowed"

    any ideas...?

    thanks
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    Okay, the DateAdd function will add/subtract date/time from current time...

    As for concatinating strings, you use the ampersand symbol (&) and not the addition/plus symbol (+)...

    Then for where conditions, you are to use the comparison operators... < > =



    Good Luck

    Comment

    Working...