Mark A Matte
markamatte at hotmail.com
Wed Feb 14 13:47:17 CST 2007
Ok...that makes sense now. I'll keep that in mind when using dates. Thanks, Mark >From: "Gustav Brock" <Gustav at cactus.dk> >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: <accessd at databaseadvisors.com> >Subject: Re: [AccessD] Dates As Criteria >Date: Wed, 14 Feb 2007 20:36:40 +0100 > >Hi Mark > >Yes, you are confused. > >First, "Short Date" can be anything, it is localized. Thus, the strict US >format expression I wrote about >Second, as you write it, only "2/14/2007" would be returned. JET SQL has no >way to know that is a date - it will think you are making two divisions. >Thus, you must wrap it in hashmarks to make it string expression for a date >value: "#2/14/2007#". > >/gustav > > >>> markamatte at hotmail.com 14-02-2007 20:25:35 >>> > >Thanks Gustav, > >I thought If I used Format(ArrestDT,"Short Date") it would be a date...and >not a string? Am I confused? > >Thanks, > >Mark > > >From: "Gustav Brock" <Gustav at cactus.dk> > >Reply-To: Access Developers discussion and problem > >solving<accessd at databaseadvisors.com> > >To: <accessd at databaseadvisors.com> > >Subject: Re: [AccessD] Dates As Criteria > >Date: Wed, 14 Feb 2007 20:12:18 +0100 > > > >Hi Mark > > > >As Lambert wrote, just using Format leaves you with a string not a date. > >If you have to - and I can't see that's the case here - you must use a US > >formatted string expression for a date value: > > > >SELECT Format([ArrestDT],"\#m\/d\/yyyy\#") .. > > > >/gustav > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com _________________________________________________________________ Check out all that glitters with the MSN Entertainment Guide to the Academy Awards® http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline2