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
 Development Tools
 Reporting Services Development
 Restrict Chart Horizontal Axis to last 12 hours
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

24 Posts

Posted - 01/03/2014 :  09:10:54  Show Profile  Reply with Quote
Hi there please can someone tell me how to restrict my chart to the last 12 hours

my hour is an int and is from 0 to 23 hours

Kind Regards


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 01/03/2014 :  09:44:42  Show Profile  Reply with Quote
Include a filter in query behind as below

WHERE hourfield > = DATEPART(hh,DATEADD(hh,-12,GETDATE()))

then in chart just choose field on corresponding axis

SQL Server MVP
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.11 seconds. Powered By: Snitz Forums 2000