C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

How to display records based on date selection.


Posted Date: 22 Aug 2007      Posted By: Mohamed Yasin      Member Level: Gold     Points: 2   Responses: 1



Hi.
I have to display records based on selection of date.
I have a scenario like "Enter start date - textbox - Enter End Date - textbox and then a Button. On Clicking this button it shd display all records within this date range. How to do this in vb.net..
Thanks...





Responses

Author: PHANI PRATHAP NADIGADDA    22 Aug 2007Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

I expect you are using SQL Server as a database and you can achieve this by creating Store Procedure and passing start date and End Date as parameters. Like....

Create Proc GetSearchData
(
@StartDate DateTime,
@EndDate DateTime
)
AS
BEGIN
SELECT col1, col2, col3 FROM table_Name WHERE dateColumn BETWEEN @StartDate AND @EndDate;
END
GO

It will help you.

ALL THE BEST.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Javascript to disable required field validators
Previous : I am not able to move the controls(textbox,labels,buttons...) using arrow keys
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use