TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anele Ngqandu
1.3k
429
27.8k
upcoming birthdays starting from current day
Apr 24 2017 8:45 AM
Hi
I need a quick modification of my query to get upcoming birthdays. Currently I get them but shows passed birthdays of current month.
var day = DateTime.Today;
// var currentDay = DateTime.Now.Day;
var month = day.AddMonths(3);
var note = (from cn
in
_peopleRepository.GetAll()
where cn.PeopleTypeId == 3
&& cn.BirthDate.Value.Month >= day.Month && cn.BirthDate.Value.Month <= month.Month
orderby cn.BirthDate.Value.Month, cn.BirthDate.Value.Day
select
new
GetLandlordBirthdayOutput
{
Id = cn.Id,
FirstName = cn.FirstName,
LastSurname = cn.LastName,
Province = cn.Province,
City = cn.City,
Suburb = cn.Suburb,
Email = cn.EmailAddress,
Phone = cn.CellNumber,
Birthday = cn.BirthDate
}).ToList();
Reply
Answers (
4
)
Passing datatable as parameter to stored procedure
Find datagridview for selected country and sum the following