[AccessD] Dates As Criteria

JWColby jwcolby at colbyconsulting.com
Wed Feb 14 13:46:26 CST 2007


>Or just use DateValue([ArrestDT])

Precisely, or some other method - Fix() etc.  

My point was simply to inform Mark that Format always returns a string, not
that format was the correct method of doing what he desired (which I have
stayed out of).


John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos
Sent: Wednesday, February 14, 2007 2:40 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Dates As Criteria

Or just use DateValue([ArrestDT])

GK

On 2/14/07, JWColby <jwcolby at colbyconsulting.com> wrote:
> AFAIK, Format ALWAYS returns a string data type.  It is just that the 
> information in that string may be a valid date, time, currency etc.  
> IOW if you then fed that to cDate(Format(SomeDate,"ShortDate")) cDate 
> would receive a string that is truly a date and can be converted.
>
>
> John W. Colby
> Colby Consulting
> www.ColbyConsulting.com
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A 
> Matte
> Sent: Wednesday, February 14, 2007 2:26 PM
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Dates As Criteria
>
>
> 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
> >
> > >>> markamatte at hotmail.com 14-02-2007 19:54:03 >>>
> >Thanks Jim...but that would cause a Circular Reference...I think??? 
> >And if I named ArrestDT something else...we are back to where I 
> >started...not returning the results I wanted.  This does disturb me a 
> >little be cause I've used FORMAT(DT_Field,"Short Date") a thousands 
> >of times...and never had this issue.  Using FIX does seem to 'fix' 
> >the problem...lol...I'm still confused...but ok.
> >
> >
> >--
> >AccessD mailing list
> >AccessD at databaseadvisors.com
> >http://databaseadvisors.com/mailman/listinfo/accessd
> >Website: http://www.databaseadvisors.com
>
> _________________________________________________________________
> Laugh, share and connect with Windows Live Messenger 
> http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http
> ://ima 
> gine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtag
> line
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


--
Gary Kjos
garykjos at gmail.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list