Query regarding between dates in c#

Posted by Gopal_nivas under ASP.NET on 6/2/2011 | Points: 10 | Views : 1759 | Status : [Member] | Replies : 1
hi..

i was inserted fromdate and to date into database table.

fromdate:1/1/2011
todate:4/1/2011

now again i choosed fromdate as 2/1/2011 and to date as 5/1/2011.

here i was already inserted this values like fromdate:1/1/2011
todate:4/1/2011
so here i want to validate the between dates so if i choosed 2/1/2011 and trying to insert means
it display a messageand it will not insert those values (here i want to validate both from date and to dates).

so how to tackle this..

need ur suggestions with examples..

regards
gopal.s




Responses

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this

select Date,TotalAllowance from Calculation where EmployeeId=1
and Date between 2011/02/25 and 2011/02/27


Mark as Answer if its helpful to you

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response