How do i express a date/time a criteria?

  • Thread starter Thread starter JethroUK
  • Start date Start date
J

JethroUK

How do i express a date/time a criteria? e.g.

"[start date] = #" & Start_Date & "#"

Where Start_Date contains "16/01/05 11:00:00" (an appointment) currently
displayed on the form
Where [start date] is the name of the containing field

despite wrapping the Start_Date with # signs it still doesn't find any
records - which of course it must find at least the one already on the form
i'm wondering whether there's a different symbol from #, to identify
date/TIME (as opposed to just date)
 
Hi Jethro,

Ive actually just been playing with some time stamps in the last half
hour. here is a peek at my work, hopefully this will help answer your
questions!

dim strYearstart As String
dim dYearStart As DateTime

strYearstart = "1/1/2005"

dYearStart = CDate(strYearstart)

strSQL = "tblPerson." & strType & " = #" & dYearStart & "#"

Hope that helps some,
Sam
 
Back
Top