Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Selecting from an Access table using a date field


Message #1 by "Jawahar Rajan" <jrajan@h...> on Thu, 28 Jun 2001 17:13:40 -0400
You should use the # delimiters around your date--Jet should translate that
into the proper date value regardless of the display format.

HTH,

-Roy

-----Original Message-----
From: Jawahar Rajan [mailto:jrajan@h...]
Sent: Thursday, June 28, 2001 2:14 PM
To: professional vb
Subject: [pro_vb] Selecting from an Access table using a date field


All,
I have a table with two columns name and entry_date
defined in MS Access as a Text column and a date/time column.
This table is updated daily . I am trying to run a query as follows
"Select Name from Table where entry_date = 6/28/2001"
I get no rows returned when i know that there are 500 row with the entry 
date 6/28/2001!
Should i be using:
"Select Name from Table where entry_date = #6/28/2001#"
Who can i query the table, i know that it is a date /time field that is 
formated to short date hence 6/28/2001.
Should i be using a trunc eg
"Select Name from Table where trunc(entry_date) = 6/28/2001" !
How can i specify the date in the where clause

Any help is appreciated
Thanks
Jawahar

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com



  Return to Index