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 2012 Forums
 Analysis Server and Reporting Services (2012)
 show just the hour in reporting services

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2014-07-28 : 08:21:35
i want in expression of parameter to ask if the hour>02:00 and hour <03:00

how can i do it?

thanks

MichaelJSQL
Constraint Violating Yak Guru

252 Posts

Posted - 2014-07-28 : 09:20:07
not really sure what you mean by have a parameter ask.

You can test this by creating a parameter and entering this as an expression for the label and value
=DatePart(DateInterval.Hour,Now() ) & ":00"
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2014-07-28 : 12:33:13
it is not working
i get an error : "...doesn't have the expected type"

i want to show just the hour, how can i do it?

for example
the time now is 02:30 i want to show 2
Go to Top of Page

MichaelJSQL
Constraint Violating Yak Guru

252 Posts

Posted - 2014-07-28 : 12:46:01
Try this:

Create a parameter, right click , selectavailable properties and add

Do th efollowing in the expression fields.
On the label try adding a value"
The Label expression is : =DatePart(DateInterval.Hour,Now() ) & ":00"
The Value expression is : =CDATE(DatePart(DateInterval.Hour,Now() ) & ":00")
Go to Top of Page
   

- Advertisement -