Re: ADO, ShortDateFormat and Terminal Services/Citrix

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"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


.



Relevant Pages

  • Re: ADo XML
    ... I don't believe you can change the format that ADO uses, ... able to use XSLT to transform the XML produced by ADO into another format. ...
    (microsoft.public.data.ado)
  • Re: Having problem with SQL statement - error no value given
    ... > I noticed that the OP is using ADO. ... >> short date format has been set to dd/mm/yyyy, ... >> Doug Steele, Microsoft Access MVP ... >> (No private e-mails, please) ...
    (microsoft.public.access.forms)
  • Re: Compiling to accde inhibits all VB
    ... are a novice. ... a page on converting DAO to ADO. ... I made the change in my 2003 baseline code, ... Opened it in 2007 and saved as 2007 format. ...
    (microsoft.public.access.modulesdaovba)
  • Re: ADO, ShortDateFormat and Terminal Services/Citrix
    ... to ADO to properly interpret the dates provided by your program. ... All date show up in whatever format the regional ... The reason it matters is because locallized filter strings need to be in ... from regional settings it shows as 4/1/2008 which is correct. ...
    (microsoft.public.data.ado)
  • Re: XML Datasource
    ... > the expected XML format with the ADO format. ... ADO loads/saves XML only with its schema. ... > he database using a connection string. ...
    (borland.public.delphi.database.ado)