Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 showing of reports in grid view reg
Posted by Gowthammanju on  5/27/2011 4:25:17 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend

can any one give me some tips regarding showing

1)monthly report:
It is in which the current month must be taken automatically from the today date and show the result in grid view

2)weekly report:
It is in which the current week by subracting 7 days from today date must be taken automatically and show the result in grid view

the problem is i am using gettype() for datetime function if the user click today den due to the time in it the results not yet displaying in grid view

waiting for ur responces,

thanks in advance


Post Your Reply Post New Question

 Viewer's Reply
reports reg
Answered By Gowthammanju on 6/2/2011 12:00:26 AM
ya thanks,

but i got the solution as

using query we can display as

//below query return current month records

select * from empdt where month(frmdate)=(select month(getdate()))

//Below query show records less than 7 days from today
select * from empdt where frmdate=(getdate()-7)

Above query explanation
* empdt -table name
* frmdate (datetime field) - month (frmdate) return value 1 to 12
* month(getdate()) return current date month
* getdate()-7 return less than 7 days from today
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
The Art & Science of JavaScript - Free 100 Page Preview!
Everything You Know About CSS Is Wrong! - Free 37 Page Preview!