Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / August 2005

Tip: Looking for answers? Try searching our database.

Date Parameter - run through date not to date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cory - 30 Aug 2005 15:45 GMT
Is there a way in reporting services to define your date parameters as
including the final date?  Right now if someone enters 08/22/2005 for the
start date and 08/29/2005 for end date it will run from 08/22/2005 12:00 AM
TO 08/29/2005 12:00 AM.  This will not include results from the 29th - which
is not what the users expect.

I'd like for it to run through the date - so 08/29/2005 23:59 or 11:59 PM

Thanks for any help.

Cory
EsWallace - 30 Aug 2005 16:49 GMT
IF THE START DATE PARAMETER IS NAMED SDATE AND THE END DATE PARAMETER IS
NAMED EDATE AND THE USER ENTERS EITHER AUG 30 2005 , 2005-08-30 OR 08/30/2005
YOU CAN CONVERT THE PARAMETER IN THE QUERY

SELECT *
FROM [TABLE]
WHERE CONVERT(VARCHAR(11),[DATE],101) >= CONVERT(VARCHAR(11),@SDATE,101)
AND  CONVERT(VARCHAR(11),[DATE],101) >= CONVERT(VARCHAR(11),@EDATE,101)

THIS IS ONE OF MANY  WAYS IT CAN BE DONE

P.S. SORRY FOR THE CAPS TO LAZY TO HIT THE CAPS LOCK : )

> Is there a way in reporting services to define your date parameters as
> including the final date?  Right now if someone enters 08/22/2005 for the
[quoted text clipped - 7 lines]
>
> Cory
EsWallace - 30 Aug 2005 16:51 GMT
OOPS THE >= ON THE @EDATE SHOULD BE <= HEHE.. DUNNO HOW TO EDIT MY POST

> IF THE START DATE PARAMETER IS NAMED SDATE AND THE END DATE PARAMETER IS
> NAMED EDATE AND THE USER ENTERS EITHER AUG 30 2005 , 2005-08-30 OR 08/30/2005
[quoted text clipped - 20 lines]
> >
> > Cory
Cory - 31 Aug 2005 17:56 GMT
Thank you for your help! (I figured the less/greater than was backwards).

Thanks again.

--Cory

> OOPS THE >= ON THE @EDATE SHOULD BE <= HEHE.. DUNNO HOW TO EDIT MY POST
>
[quoted text clipped - 22 lines]
> > >
> > > Cory
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.