Showing posts with label settings. Show all posts
Showing posts with label settings. Show all posts

Sunday, March 25, 2012

Daylight Savings change

All,

I am curious if there is anything to worry about with the recently adopted change to the Daylight Savings settings and SQL Server? Are there any required patches, suggestions, etc?

Thank you

Take a look here http://www.microsoft.com/windows/timezone/dst2007.mspx

Denis the SQL Menace

http://sqlservercode.blogspot.com/

|||

The link above is right. In short you will need to update your operating system, which should happen automatically through Windows Update, but there is no need to patch SQL Server.

We were recently reviewing all components to check if there is potential area that needs updating, and we have not identified any.

Regards,

Maciek Sarnowicz

Sunday, March 11, 2012

Datetime function glitch -- same settings, different results

hi guys,

i am encountering a pretty weird problem on our SQL database stored procs, particularly those concerning datetime functions. we have two setups, one is on london, and another one is here in singapore. both servers have the same regional settings, the same database tables, stored procs and functions, almost the same in every aspect. the only difference we know is that one is a direct database cut (sql 7.0), while the other used database migration in win2k.

here goes: all stored proc functions work just fine on the singapore setup. the london setup however, is not working at all! it does all the functions like change flags and status, but it doesn't update dates nor search for data by date. i have also checked on the collision names, and they are the same. where else could i start searching for discrepancies between the two?

hope to hear something from you guys, i'm getting desperate. thanks in advance!

What do you mean by "but it doesn't update dates nor search for data by date". The date representation is a session setting which can be different depending on the user which is using the SQL Server. YOu have to be aware that an application which was not prepared to handle that might encounter problem during data retrieval or manipulation.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Here's an example: I have a datetime column that contains the date when info on a particular row gets altered. Ideally, everytime the user changes something from the front end, this corresponding date info gets updated as well. The weird thing here is that my setup on the Singapore database works just fine, the date gets updated. However, the London setup doesn't do this. I have checked the language and other regional settings, and they are the same across these two databases. I also checked the user profiles, and they have the same settings as well.

My stored procs use the datetime variable, and so does the application that calls the stored procs.

What have I overlooked?

|||

Can you provide some example of the method used that's supposed to execute this date-update operation?

Exactly what is the 'error'? Is it that nothing happens, or is it that the expected rows aren't found?
There are many subtle differences between 'not working' and 'not working' =;o)

/Kenneth

|||I would suggest you use Profiler to trace the code that gets generated and then you can isolate whether it is the code generated or "user error"...

Check out my SQL Server 2005 Video Tutorials: http://www.learnsqlserver.com/

Datetime format regardless regional settings

Hi,

in tsql there is a common format for datetime (regardless regional settings)?

I use : 'mm/dd/yyyy' to access cols in database,

but someone says that the right one is: yyyy-mm-dd.

Any suggestion about that?

Thank a lot

I believe you want the ISO format -- 112; that is yymmdd. Can somebody double check this?


Dave

|||

yes dave.. 112 is the ansi unseperated date format.....

so best option is to get all ur date in this format: select convert(varchar, getdate(), 112)

|||

Hi,

I tried thid on nortwind DB (date are: dd/mm/yyyy)

select * from orders where orderdate < '19960704'

this does work, no data are retrieved,

but works for:

select * from orders where orderdate < '07/04/1996'

select * from orders where orderdate < '1996-07-04'

both select one row (if nortwind is the original one)

?

any suggestion?

All extract the same regardless the regional settings?

|||

Fast:

I tried all three queries against my copy of the northwind database. The lowest date that I have in the orders table is the date '07/04/1996'. For this reason, I do not get any rows returned with any of the select statements. However, when I change the "less than" operator to a "less than or equal to" operator I get the expected row. I am not getting the same results as you. I am afraid I can't help on this one. Sorry fo adding to confusion.


Dave

|||

hmm..works fine with me...the lowest date in northwind is..1996-07-04 00:00:00.000..

i get 0 rows for all the queries u mentiones...and 1 each when i use <= ..

neways...wat do u want to achieve exactally....see 112 is the ansi date format, which shud be used for date conversion and comparisons as its the standard....select convert(varchar(10), getdate(), 112) ...

yyyy-mm-dd +time is how sql server present it as..

|||

Sorry for having written too fast,

all three select retrieve 1 record if date is minor than 5 july 1996,

I have tried all queries with several regional settings and everything work.

If anyone has other suggestion, is welcome

Besides in internet there are this interestings articles:

http://classicasp.aspfaq.com/date-time-routines-manipulation/how-do-i-delimit/format-dates-for-database-entry.html

and

http://www.karaszi.com/SQLServer/info_datetime.asp

Thank

DateTime format in Report manager (parameter)

Hi,
I would like the report manager to accept datetime parameters in a specific
format (European). I've set the report settings to the correct language, and
parameter input in the visual studio report designer works like it should.
But after deploying the reports, the way the datetime parameter has to be
inputted changed from European (dd/mm/yyyy) to US format (mm/dd/yyyy). The
dates on the report itself are shown correctly.
Is there a way to tell the report manager which datetime format it should use?
thx!
--
AndreasThe date format will be based on the locale requested by the client browser.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andreas" <Andreas@.discussions.microsoft.com> wrote in message
news:1A293983-0517-46C4-9A70-153B59DB47F3@.microsoft.com...
> Hi,
> I would like the report manager to accept datetime parameters in a
> specific
> format (European). I've set the report settings to the correct language,
> and
> parameter input in the visual studio report designer works like it should.
> But after deploying the reports, the way the datetime parameter has to be
> inputted changed from European (dd/mm/yyyy) to US format (mm/dd/yyyy). The
> dates on the report itself are shown correctly.
> Is there a way to tell the report manager which datetime format it should
> use?
> thx!
> --
> Andreas

Thursday, March 8, 2012

Datetime conversion under diferent versions of SQL

You are probably passing dates in some regional format (e.g. dd/mm/yyyy) and
this is okay on one server (which may have British language settings) but
not on another (which may have US English language, or mdy dateformat). To
avoid these problems, always pass dates as 'YYYYMMDD'...
Aaron Bertrand
SQL Server MVP
http://www.sqlblog.com/
http://www.aspfaq.com/5006
"kTodos" <kanduru.x@.iol.pt> wrote in message
news:%23YZA%23Q6rHHA.2240@.TK2MSFTNGP03.phx.gbl...
> Hello!
> I'm using the same script to insert/update records on diferent versions of
> SQL but i'm getting this error:
> [Microsoft][ODBC SQL Server Driver][SQL Server]A converso de um tipo de
> dados char em um tipo de dados datetime resultou em um valor datetime fora
> do intervalo.
> (translation: error converting one string into datetime value out of
> range)
> The SQL versions that I am probing is 8.00.194 (RTM) that is installed
> with Microsoft SQL Personal Engine CD and ther other version is 8.00.2039
> (SP4) that i've downloaded and installed.
> Can anywone help me?
> Regards,
> kTodos
>
... and for some extra reading: http://www.karaszi.com/SQLServer/info_datetime.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OtJcSa8rHHA.1200@.TK2MSFTNGP04.phx.gbl...
> You are probably passing dates in some regional format (e.g. dd/mm/yyyy) and this is okay on one
> server (which may have British language settings) but not on another (which may have US English
> language, or mdy dateformat). To avoid these problems, always pass dates as 'YYYYMMDD'...
> --
> Aaron Bertrand
> SQL Server MVP
> http://www.sqlblog.com/
> http://www.aspfaq.com/5006
> "kTodos" <kanduru.x@.iol.pt> wrote in message news:%23YZA%23Q6rHHA.2240@.TK2MSFTNGP03.phx.gbl...
>

Wednesday, March 7, 2012

Datetime - Regional Settings

Hi,

I am using an ODBC connection with Visual Interdev 6.0 to connect to a SQL datbase and display SQL tables on a website. I am having difficulty displaying the datetime in the correct format.

It appears that the datetime is being displayed in a format that is independent of the REGIONAL settings on either the client or the server! If I change the regional settings on either machine, the datetime is still displayed in the same format.

Any ideas as to how to solve this much appreciated!::I am using an ODBC connection with Visual Interdev 6.0 to connect to a SQL datbase and
::display SQL tables on a website

These problems could be rlated to our understanding of the stuff you are using. Basically, you seem, in addition, not to be aware of the difference between ASP and ASP.NET.

ASP.NET is the successor of ASP - and has nothing in common, codewise and usage wise.

THESE forums HERE are talking about ASP.NET.

I suggest you take your ASP question to news.microsoft.com - into the ASP groups there.

Getting a sensible answer ehere would be luck - I personally have stoopped working with ASP and Interdev yeawars ago ahd hardly remember anything from these hard times.|||Pass the date pre-formatted as a string to the front-end.