1 Custom Contributions Report 1 Kelley Langkamp posted 9 Years Ago I made a page for our accounting team that they can put a start date and end date into a very basic HTML form. Clicking Submit is supposed to reload the page and pass the parameters to a dynamic block on the page that pulls total giving per fund per campus within those dates. The page works fine for me (Rock Administrator) but when our accounting team tries to run it, they get a error message that there was an error converting date and/or time from character string. Query from the dynamic block Declare @sdate AS datetime Declare @edate AS datetime SET @sdate = @startdate SET @edate = @enddate SELECT c.[Name] AS Campus, fa.[Name] AS Fund, sum(td.[Amount]) AS Total, @sdate AS sdate, @edate AS edate FROM [FinancialTransactionDetail] td JOIN [FinancialTransaction] t ON t.[Id] = td.[TransactionId] JOIN [PersonAlias] pa ON pa.[Id] = t.[AuthorizedPersonAliasId] JOIN [Person] p ON p.[Id] = pa.[PersonId] JOIN [Group] g ON g.[Id] = p.[GivingGroupId] JOIN [Campus] c ON c.[Id] = g.[CampusId] JOIN [FinancialAccount] fa ON fa.[Id] = td.[AccountId] WHERE t.[TransactionDateTime] >= Cast(@startdate AS datetime) AND t.[TransactionDateTime] < Cast(DateAdd(day, 1, @enddate) AS datetime) group BY c.[Name], fa.[Name] ORder By c.[Name], fa.[Name]
Kelley Langkamp 9 years ago So it turns out when I went to double check the format of the parameters in the URL, this is actually an IE problem. It works fine in Firefox, Chrome and even Edge. IE adds the date to the URL as undefined making my URL page/387?Startdate=undefined&Enddate=06/30/2015. Darn IE!