Jack
If the Column CreateDateTime is a Date/Time data type and your expression
is:
WHERE DatePart("yyyy",CreateDateTime)=2004
Then my guess is that there are no rows in the table that have a 2004 date.
If you think that there are dates with 2004 years in them in the
CreateDateTime column you might want to double check the column type again.
Ron W
www.WorksRite.com
> Hi,
> I got a table where the createdatetime field creates a date and time stamp
> for each of record creation. I need to pull all the records for the year
> 2004. In the criteria for the createdatetime field, if I write
> DatePart("yyyy", CreateDateTime) = 2004, no data pulls from the database. I
> am wondering where I am going wrong. I appreciate any help. Regards.
KARL DEWEY - 05 Aug 2005 00:26 GMT
In query design view grid add in the Field row --
X:DatePart("yyyy",CreateDateTime)
In the criteria row under the above field use --
[Enter your year (2003)]
Uncheck the Show box.
> Jack
>
[quoted text clipped - 15 lines]
> I
> > am wondering where I am going wrong. I appreciate any help. Regards.