Re: ADO, ShortDateFormat and Terminal Services/Citrix
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Fri, 23 May 2008 17:24:32 -0500
"Isaac Alexander" <isaacNOSPAM@xxxxxxxxxxxxxxxxxxx> wrote in message
news:ewB6E9RvIHA.5448@xxxxxxxxxxxxxxxxxxxxxxx
It gets it from the Registry Regional Settings.
It's a mistake to have varying date formats. Formats should only be
involved when displaying dates to users. You should not be leaving it up
to ADO to properly interpret the dates provided by your program. Users
should be provided controls (calendar controls) to allow them to supply
dates to you in a standard format. Dates being handled in your program
should be format-insensitive: e.g., VB uses doubles to represent
date-times.
Thank you for you comments, but my app isn't changing the ShortDateFormat,
it's simply reading it. All date show up in whatever format the regional
settings show.
The reason it matters is because locallized filter strings need to be in
short date format (at least with Delphi).
So when I format Jan 4, 2008 to the machines short date format (D/M/YYYY)
from regional settings it shows as 4/1/2008 which is correct. When that
string is passed to the local ADO filter, it think's it is 1/4/2008 which
obviously brings back the wrong data.
Any ideas where I should start looking?
Re-read what Bob is telling you. You can not depend on default formats.
Keep dates as 'date' datatypes. Format only when presenting or using.
As far as I know the only 'dependable' format is "YYYY/MM/DD".
-ralph
.
- Follow-Ups:
- Re: ADO, ShortDateFormat and Terminal Services/Citrix
- From: Isaac Alexander
- Re: ADO, ShortDateFormat and Terminal Services/Citrix
- References:
- ADO, ShortDateFormat and Terminal Services/Citrix
- From: Isaac Alexander
- Re: ADO, ShortDateFormat and Terminal Services/Citrix
- From: Bob Barrows [MVP]
- Re: ADO, ShortDateFormat and Terminal Services/Citrix
- From: Isaac Alexander
- ADO, ShortDateFormat and Terminal Services/Citrix
- Prev by Date: Re: ADO, ShortDateFormat and Terminal Services/Citrix
- Next by Date: Re: Make a disconnected recordset editable
- Previous by thread: Re: ADO, ShortDateFormat and Terminal Services/Citrix
- Next by thread: Re: ADO, ShortDateFormat and Terminal Services/Citrix
- Index(es):
Relevant Pages
|