Click to See Complete Forum and Search --> : getDate()


ldoodle
04-28-2009, 09:01 AM
Hiya,

WHERE intAbsID NOT IN ('429','9170') AND dteDate = getDate()
Why does getDate() not show records matching today's date? If I hard code it as dteDate = '28/04/2009' it works.

Also, if I set a variable:

dteToday = Date()
then use:

WHERE intAbsID NOT IN ('429','9170') AND dteDate = '" & dteToday & "'
it works.

Have I misunderstood getDate()?

pollymac
04-28-2009, 10:30 PM
getDate() returns both the time and the date.

ldoodle
04-30-2009, 03:15 AM
Yes figured that out now.

Had to convert getDate() to only include the date.