Depending on your regional settings, the parameter you are passing in for @TimeItemAdded might not be recognized.

You should pass the date in as:

20120720
Answer from LittleBobbyTables - Au Revoir on Stack Overflow
🌐
SQLTeam
forums.sqlteam.com › ssas and ssrs
[RESOLVED]SSRS Error converting Datatype NVARCHAR to DATETIME / Too many Arguments Specified - SSAS and SSRS - SQLTeam.com Forums
January 20, 2016 - Hey all, I'm trying to modify this existing SSRS report that our users run on a need-basis ( Link is posted on our SharePoint, they run it whenever they need to pull some order data). The report is built using a couple SPs and an Agent job. The first SP, let's call it Order_SP, builds the table ...
🌐
Stack Overflow
stackoverflow.com › questions › 28974742 › ssrs-error-converting-data-type-nvarchar-to-datetime
sql - SSRS - Error converting data type nvarchar to datetime - Stack Overflow
March 10, 2015 - CREATE PROCEDURE [dbo].[LRP_ContributionDetail_BASE_trn] (@fyear int= null, @fyear_end int = null, @start_dt_post datetime= null, @end_dt_post datetime=null, @list_no int = 0, @start_dt datetime = null, @end_dt datetime = null, @include_restricted char (1) = null --recently added parameter ) AS SET ANSI_WARNINGS OFF SET CONCAT_NULL_YIELDS_NULL OFF SET NOCOUNT ON if @fyear_end is null or @fyear_end = 0 set @fyear_end = @fyear if @start_dt_post is null set @start_dt_post = '1/1/1900' if @start_dt is null set @start_dt = '1/1/1900' if @end_dt_post is null set @end_dt_post = GETDATE() if @end_dt i
Discussions

SSRS Error converting datatype NVARCHAR to DATETIME / Too many Arguments Specified – SQLServerCentral Forums
SSRS Error converting datatype NVARCHAR to DATETIME / Too many Arguments Specified Forum – Learn more on SQLServerCentral More on sqlservercentral.com
🌐 sqlservercentral.com
January 20, 2016
SSRS Report Error
Hi, I am new to SSRS i am building my report below is the stored proc i used and when i created my parameters, i keep getting an error converting nvarchar datatype to datetime when i run my report. CAN ANYONE PLEASE HELP? Error below Error occurred during local processing An Error occurred ... More on forums.sqlteam.com
🌐 forums.sqlteam.com
0
0
April 5, 2018
Converting from char to date in SSRS – SQLServerCentral Forums
Error converting data type nvarchar to datetime. I suppose what I really want is to be able to convert my datevar to datetime in SSRS as I want to utilise the calendar control but I'm not sure where to do this as my dataset merely consists of spGdbaSourceExport More on sqlservercentral.com
🌐 sqlservercentral.com
February 19, 2009
sql server - SQL conversion failed when converting nvarchar value to data type int on SSRS - Stack Overflow
I have the following query SELECT * FROM A WHERE Id IN (@Input) where the @Input is a multi-value parameter from SSRS and Id is an integer on the database. When I try to run it with a single va... More on stackoverflow.com
🌐 stackoverflow.com
🌐
SAP Community
answers.sap.com › questions › 12728041 › converting-nvarchar-to-a-date-using-ssrs-2017-and-.html
converting NVARCHAR to a date using ssrs 2017 and ... - SAP Community
July 11, 2019 - am using SSRS 2017 to query a SAP hana database using an ODBC connection. I return a date column BUDAT as 20190101. I am trying to convert this to a date, but in the Sataset screen won't let me use the CONVERT or FORMAT command : Attempt #1: CONVERT(DATE,RIGHT(SAPABAP1.AFRU.BUDAT,2)+ ...
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › ssrs-error-converting-datatype-nvarchar-to-datetime-too-many-arguments-specified
SSRS Error converting datatype NVARCHAR to DATETIME / Too many Arguments Specified – SQLServerCentral Forums
January 20, 2016 - If i run the report in the copy version ( Added the 4 columns and configured 2 Origin/Dest country parameters) i get the error "Procedure or Function has too many arguments specified". If i run the original report without the added columns or parameters, i get the error "Unable to convert datatype NVARCHAR to DATETIME"...
🌐
SQLTeam
forums.sqlteam.com › ssas and ssrs
SSRS Report Error - SSAS and SSRS - SQLTeam.com Forums
April 5, 2018 - Hi, I am new to SSRS i am building my report below is the stored proc i used and when i created my parameters, i keep getting an error converting nvarchar datatype to datetime when i run my report. CAN ANYONE PLEASE HELP? Error below Error occurred during local processing An Error occurred during report processing Query execution failed to dataset 'Loangauges' error converting data type nvarchar to datetime* -- create PROCEDURE [dbo].[proc_LoanGauges] --EXEC dbo.proc_LoanGauges @Re...
Find elsewhere
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › converting-from-char-to-date-in-ssrs
Converting from char to date in SSRS – SQLServerCentral Forums
February 19, 2009 - Error converting data type nvarchar to datetime. Could it be that it's to do with the way SQL Server has been set up on my machine? ... Are you running this from SSRS or directly from QA? If it's from SSRS make sure you change your parameter to the correct datatype as well.
Top answer
1 of 2
1

Well, when passing the parameter values to the dataset, first you need to convert your input parameter values to the list of CSV values.

For example, if your parameter is like:

With properties such as:

You should consume that in your dataset using JOIN function.

e.g.:

=JOIN(Parameters!input.Value,",")

It should look like:

Now, your dataset will view/receive @input as '123,456,789'

And, now you can use any split function to split the values and can use them in your SQL.

In case if there is no split function available, you can use any custom SQL (an example given below) to change the multiple values to a single-valued table:

e.g.:

DECLARE @input VARCHAR(MAX) = '123,456,789'
IF OBJECT_ID('TEMPDB..#Multi') IS NOT NULL DROP TABLE #Multi;
CREATE TABLE #Multi (value  INT);
DECLARE @Insert VARCHAR(MAX) = 'INSERT INTO #Multi VALUES ('''+REPLACE(@input,',','''),(''')+''');';
EXEC (@Insert);
SELECT value FROM #Multi

Will return following output:

And you final SQL should be SQL chunk given above and:

SELECT * FROM A
WHERE Id IN (SELECT value FROM #Multi)

OR

SELECT * FROM A
JOIN #Multi M ON A.Id=M.value

Hope this help.

2 of 2
0

SSRS passes multi value parameters as a string when multiple options are selected. You can verify this by running SELECT @Input. It should see '123,124'. To pass these to your query, I would split them, cast them as an ints, then run them in your query. Something along the lines of:

DECLARE @ssrs_input NVARCHAR(MAX) = @input
DECLARE @input_tbl TABLE (
  input INT
  )

WHILE CHARINDEX(',',@ssrs_input) > 0
BEGIN
  INSERT @input_tbl 
    SELECT CAST(SUBSTRING(@ssrs_input,0,CHARINDEX(',',@ssrs_input)) AS INT)
  SET @ssrs_input = SUBSTRING(@ssrs_input,CHARINDEX(',',@ssrs_input)+1,LEN(@ssrs_input))
END

INSERT @input_tbl 
    SELECT CAST(@ssrs_input AS INT)

SELECT *
FROM A
JOIN @input_tbl ON
    a.Id = @input_tbl.input

Word of warning, the cost of this increases when your number of inputs gets large. If you plan on having a lot of options with a select all, you may want to explore other avenues.

🌐
Medium
medium.com › @python-javascript-php-html-css › how-to-fix-common-errors-when-converting-nvarchar-to-datetime-in-sql-0061ad539a94
How to Fix Common Errors When Converting NVARCHAR to DATETIME in SQL
December 24, 2024 - As I attempted to convert this NVARCHAR value to a DATETIME type for sorting, I used SQL’s CONVERT function. However, instead of achieving my goal, I ran into an error: SQL Error [241]: Conversion failed when converting date and/or time from character string.
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › error-converting-data-type-nvarchar-to-datetime-in-sql-ssrs-2008
Error converting data type nvarchar to datetime in SQL SSRS 2008 – SQLServerCentral Forums
November 2, 2009 - I created a report in SSRS 2008, the proc runs fine in query analyzer also from query inside the dataset. When i preview the report returns the error (Error converting data type nvarchar to datetime)
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › functions › cast-and-convert-transact-sql
CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn
For example, the following code fragment leaves @x holding just 'ab'. There isn't enough space to hold the supplementary character. DECLARE @x NVARCHAR(10) = 'ab' + NCHAR(0x10000); SELECT CAST(@x AS NVARCHAR(3));
🌐
DBA Diaries
dbadiaries.com › home
How to fix “conversion failed when converting date and/or time from character string” | DBA Diaries
May 1, 2023 - Thoughts and experiences of a DBA working with SQL Server and MySQL · April 30, 2023 by Andy Hayes Leave a Comment
🌐
Edureka Community
edureka.co › home › community › categories › database › error converting data type nvarchar to datetime...
Error converting data type nvarchar to datetime SQL Server | Edureka Community
August 15, 2022 - I encountered this error: Error converting data type nvarchar to datetime When inputting a date in ... 104) Can someone please help me with this?
🌐
SQLTeam
forums.sqlteam.com › transact-sql
Conversion from nvarchar to an appropriate date format - Transact-SQL - SQLTeam.com Forums
December 8, 2020 - Hi All, i have physical table where the data type of the column is nvarchar(15) now i want to convert the date format to yyyy-mm-dd how can i do that ? declare @date nvarchar(15) = '20/3/2018' select convert(varchar(10),replace(@date,'/','-'),120) current output 20-3-2018 expected output 2018-03-20
🌐
BoldBI
support.boldbi.com › kb › article › 13055 › resolving-sql-server-exception-conversion-of-varchar-data-type-to-datetime-data-type-resulted-in-an-out-of-range-value
Fix SQL error Varchar to Datetime conversion out-of-range issue.
October 16, 2023 - Reason: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.” This error typically occurs when there is a mismatch in the date format.
🌐
Experts Exchange
experts-exchange.com › questions › 29261434 › Conversion-failed-when-converting-date-and-or-time-from-character-string.html
Solved: Conversion failed when converting date and/or time from character string. | Experts Exchange
June 21, 2023 - Reason I ask is because the code up top shows INSERT INTO t_db_full_list, where the datetime values can have NULLs so that shouldn't throw an error, but there's a CREATE TABLE t_db_list which defines these columns as NOT NULL which would throw an error.