April 18, 2018 at 10:09 am
Hello Everyone,
I have a dataset that's bringing back 3 months of data, including a date. What I would like to do is count the number of records based on todays date. I have an expression built but it's not working...
=SUM(Iif(Fields!CompletedDate.Value = Today(), 1, 0))
Am I on the right track or is this just not possible in ssrs and will have to find another way?
Thanks for your help in advance
Matt
April 19, 2018 at 6:36 am
if your completedDate column is datetime, that could be your issue, comparing something with a time element to something without one.
-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
April 19, 2018 at 6:40 am
Yes, it is. I will have to find another way. Thanks for the reply!
April 19, 2018 at 4:13 pm
either change the format in the query, or use something like FormatDateTime(Fields!CompletedDate.Value,DateFormat.ShortDate) = Today()
-------------------------------------------------------------------------------------------------------------------------------------
Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses
April 20, 2018 at 3:46 am
I tried to format it and for some reason it still didn't work. I did find a workaround though(not the most efficient way though).
thanks for the input!
April 24, 2018 at 7:58 am
meichmann - Friday, April 20, 2018 3:46 AMI tried to format it and for some reason it still didn't work. I did find a workaround though(not the most efficient way though).
thanks for the input!
Probably better to add an additional column in your stored procedure, that is simply CONVERT(date, your_date_column_name_here) AS NewDateColumn
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply