Re: Insert query rearranges date value.
- From: "Douglas J. Steele" <NOSPAM_djsteele@xxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Dec 2005 08:22:09 -0500
I think Rick's point was that if you put #12/10/2005# as a constant in your
application, it would be a bad thing if it was treated as 10 Dec, 2005 for
Joe, and 12 Oct, 2005 for Mary. It really doesn't matter whether your
application is going to be used around the world or not. You have no control
over what settings your users choose, so you need to ensure that your
application will work regardless what wrinkles they throw you.
Note that while Allen's article mentioned that the treatment of # changed in
the 32-bit world, he also pointed out that "In all versions of Access
(including the 16-bit versions), JET SQL clauses require dates in American
format."
If you want to set a constant date, use the DateSerial function:
DateSerial(2005, 10, 12) to get 12 Oct, 2005, or DateSerial(2005, 12, 10) to
get 10 Dec, 2005.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Jarryd" <Jarryd@xxxxxxxxxxxxxxxxxx> wrote in message
news:uSaxsGWAGHA.3140@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Rick,
>
> I am not so sure that I follow. You enclose a date variable with ##,
> correct? So, as a developer I would find it easier to have the system
> recognise that as a date and read it in accordance with the users Regional
> Settings. That way, when I develop something, I personally don't have to
> write code that will check the settings and interpret the date, for every
> app I write that might be distributed to users across the world. So yes,
> I do think it would be better that my query ran differently depending on a
> user's Windows settings. Why wouldn 't I? Am I not understanding
> something? According to the web page forwarded to me by Douglas it used
> to work that way, but was changed with the new 32-bit platform. I can
> only assume their might have been some kind of technical issue, but again,
> they could work it out if they wanted to. And I am not so sure that
> taking the view that it all comes down what would suit their largest
> client-base and the rest will just have to put up with it is a very good
> business strategy in an international market. Anyway, this is a technical
> forum and this argument is not a new one. I have read loads of complaints
> about this very issue in the last couple of hours and it seems clear to me
> that something could be done, but just won't.
>
> Cheers,
>
> Jarryd
>
> "Rick Brandt" <rickbrandt2@xxxxxxxxxxx> wrote in message
> news:4U0of.29316$BZ5.15405@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> "Jarryd" <noemail@xxxxxxxxxxxx> wrote in message
>> news:uZqJGtPAGHA.3140@xxxxxxxxxxxxxxxxxxxxxxx
>>> Hi Douglas,
>>>
>>> Thanks for such a speedy reply. I must admit that is a terrible thing
>>> to learn about MS. I suppose it is easy enough to get around it, but it
>>> really is rather annoying that they design a product that will coax the
>>> rest of the wolrd to it the USA way. Not very nice. Anyway, thanks for
>>> elucidating me of this little oddity.
>>
>> If as a developer you create a query with a date literal in it would you
>> really think it better if your query ran differently depending on a
>> user's Windows settings? MS had to pick *some* consistent format to
>> apply when an ambiguous date literal is encountered. It is hardly
>> surprising then that they chose the format used by the majority of their
>> user-base.
>>
>> The best thing to do is to never use a date literal that is ambiguous.
>>
>> --
>> I don't check the Email account attached
>> to this message. Send instead to...
>> RBrandt at Hunter dot com
>>
>>
>
>
.
- References:
- Insert query rearranges date value.
- From: Jarryd
- Re: Insert query rearranges date value.
- From: Douglas J. Steele
- Re: Insert query rearranges date value.
- From: Jarryd
- Re: Insert query rearranges date value.
- From: Rick Brandt
- Re: Insert query rearranges date value.
- From: Jarryd
- Insert query rearranges date value.
- Prev by Date: Re: Cancelling Save on Bound Form
- Next by Date: help with a loop
- Previous by thread: Re: Insert query rearranges date value.
- Next by thread: Open App
- Index(es):
Relevant Pages
|