Re: Inserting regional settings specific data into sql server



Niketa,

DateTime and Short Time are not notated in SQL server in any local variant.

It is notated in ticks starting at 1753 and 1900.

If you avoid giving DateTimes as strings to the SQL Sever, than you will not
have any problem.

Strings can be converted in your program by the commands.
CDate (Visual Basic)
DateTime.Parse
Convert.ToDateTime

To give the datetime information to the server you "should" use parameters.
See this as most simple sample.

http://www.vb-tips.com/default.aspx?ID=886bba68-8a2f-4b99-8f66-7139b8970071

By the way InvariantCulture is for inside the English Language culture. The
most people in that use September 11 as date while the most countries use 11
September as date.

I hope this helps,

Cor



.



Relevant Pages

  • Re: between dates with no time consideration
    ... Columnist, SQL Server Professional ... just the range doesnt declare @start as datetime ... "Tom Moreau" wrote in message ... > "Tom Moreau" wrote in message ...
    (microsoft.public.sqlserver.programming)
  • Re: DateTime, variants and double
    ... SQL Server stores them as paired integers - see BOL ... The table has a field of type DateTime which for various reasons I ... SELECT CAST AS FLOAT) ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: Convert help needed desperately
    ... overflow error converting expression to data type datetime. ... Is my sql server hosed???? ... > the timestamp data type. ...
    (microsoft.public.sqlserver.programming)
  • Re: DayLight Saving woes
    ... I can't find the document that gave me the impression of discrete elements ... So great, you only two datetime ... way it is in SQL Server, and I don't expect it to change any time soon. ... But SQL Server itself has no idea about time zone. ...
    (microsoft.public.sqlserver.programming)
  • Re: trouble porting a trivially simple function - with declared variables
    ... CREATE FUNCTION my_max_market_date RETURNS datetime ... DECLARE @mmmd AS datetime; ... SQL Server comes with an extensive Online documentation, ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)

Loading