Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Wednesday, March 21, 2012

datetime procedure argument wont accept datetime value?

I am using Microsoft SQL Server Management Studio to connect to MSSQL 2005.... There is a stored procedure which has the following value amongst its parameters:

@.created_after datetime = null,

When I right-click the procedure and select Execute Stored Procedure, and enter a date like "23/01/2007 8:54:59 AM" into that field the following error is produced:

Msg 8114, Level 16, State 5, Procedure search, Line 0
Error converting data type nvarchar to datetime.
(1 row(s) affected)

As well as showing the following:

USE [FileStore]
GO

DECLARE @.return_value int

EXEC @.return_value = [dbo].[search]
@.created_after = N'23/01/2007 8:54:59 AM'

SELECT 'Return Value' = @.return_value

GO

Any idea why it will not accept my date value?

Any help would be appreciated ... Thank you :)

try input the datetime in universal format YYYYMMDD HH:MM:SS

Your system date format might not be DD/MM/YYYY|||You seem to be 100% correct! How can I change this?

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.