Radu,
How exactly are you specifying the date? Are you specifying it as a date,
e.g., "Jan 12, 2002" or some equivalent variation, or are you specifying it
an integer offset from a base date ... for example, as 37266 ?
If you are using the latter technique, be aware that SQL Server, currently,
stores data in datetime data types as an integer offset from a base date of
Jan 1, 1900. Is this the same base date used internally by Delphi? I would
wager that it is not. In general, DO NOT use knowledge of how products store
data internally when programming. I doubt whether Borland or Microsoft have
guaranteed that they will not change the base dates of their products.
However, both Borland and Microsoft will, I'm sure, guarantee that if you
specify "Jan 12, 2002" then their respective products will always correctly
interpret that.
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
> Hello!
> I am using ADO with Delphi to connect to a SQL Server 2000 Server.
> When I make an insert with the date of my computer, on the server the date
> is increased and saved with two days later. Why?
> Thanks
> --
> Radu Vacaru
> ROLLSOFT S.R.L.
> Calea Dumbravii 21/62
> 2400 Sibiu, Romania
> phone/fax 0040-69-232306
> http: www.rollsoft.ro