Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 datetime conversion errors.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-14 : 23:51:38
Daniel writes "Hello,

I've read some previous tips from people trying to write datetime values to SQL, and it resulting in errors. I've taken on board your tips about using the CONVERT function within my Stored Procedures, but still I get a char type conversion error.

Now, I'm using a VBScript function DateSerial(yyyy, mm, dd) to construct my date, and it uses form inputs from an HTML page. The problem, I think, is that the above function creates a UK type date (dd/mm/yyyy) and SQL is expecting the American format (mm/dd/yyyy).

So, why are these two native functions using different time formats, and how can I get SQL expecting dates in the proper time format :-) ... that's the UK version, of course?

I don't want to be building custom functions that convert everything around, so if there's a set-up function I've missed, can you please indicate it for me?

Thanks for your time, and hope you can help?

Daniel Newman.

For info:
Windows 2000 professional;
SQL Server 2000."
   

- Advertisement -