Access VBA date/time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • camastanta
    New Member
    • Dec 2009
    • 2

    Access VBA date/time

    Hi

    How to compare a date/time via VBA with a date/time in an Access DB?

    The query I use

    adoRS.Open "SELECT * FROM currentposition s WHERE ((currentpositi ons.
    [dateLT])=" & "#" & date_from_messa ge & "#" & ")", adoConn, adOpenStatic,
    adLockOptimisti c

    I only achieve to compare a date.

    Anybody an idea?

    Regards
    Camastanta
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    Look at the DateDiff Function...



    Good Luck

    Comment

    Working...