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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Conversion failed when converting date and/or time
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

5 Posts

Posted - 07/29/2013 :  13:31:16  Show Profile  Reply with Quote
I have some code that runs exactly as I want it to, however when I change the date from 'December 2012' to 'May 13' (This is exactly how it is stored in the data) I get this error message:
Msg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
Warning: Null value is eliminated by an aggregate or other SET operation.

The code runs without any issues for December data. Any ideas?

Almighty SQL Goddess

38200 Posts

Posted - 07/29/2013 :  14:17:09  Show Profile  Visit tkizer's Homepage  Reply with Quote
Show us the code and point out which column it is.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server

Subscribe to my blog
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 07/30/2013 :  02:46:09  Show Profile  Reply with Quote
this reason may be related to dateformat seeting/ language regional setting of the server.

Try to pass date values in unambiguos format like YYYYMMDD

SQL Server MVP
Go to Top of Page

kameswararao polireddy
Starting Member

19 Posts

Posted - 08/28/2013 :  11:11:12  Show Profile  Reply with Quote
You can find different types of date formats in the below link.

P.Kameswara rao
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000