Hi To All,
Am new to .net pls help to me,
I need From-TO dates query in Sql Server 2005, i have two textboxs, based on that textbox date values i need to display events to the user.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naresh AvariPosted Aug 21, 2012, 4:43 AM
If you have two textboxes called as txtStartDate and txtEndDate.
Hope this helps you...
Hemant KumarPosted Aug 21, 2012, 6:11 AM
Mark as "Accepted Answer" if it helps you .
Prabhakar ReddyPosted Aug 21, 2012, 6:07 AM
Hemant KumarPosted Aug 21, 2012, 3:30 AM
Try this Query
select * from tbl_abc where trunc(StartTime) between to_date('2009-07-15',
'YYYY-MM-DD') and to_date('2009-07-16', 'YYYY-MM-DD');
Do refer this link for Getting the data based on the To and From Dates in SQL SERVER
http://www.aspdotnet-suresh.com/2012/08/query-to-get-data-between-two-dates-in.html