using calendar for birthdays
-
Hello there guys.Im trying to use an aspx calendar and database to display birthdays.I have everyones ID numbers in the database so using that I want to display their birthdays on that specific day.For example today.I have to check everyone that celebrates today and display their names from a database. Please help guys.Thanx in advance
kagiso
-
Hello there guys.Im trying to use an aspx calendar and database to display birthdays.I have everyones ID numbers in the database so using that I want to display their birthdays on that specific day.For example today.I have to check everyone that celebrates today and display their names from a database. Please help guys.Thanx in advance
kagiso
U will have to write Windows Service which will check Birthday Dates everyday morning or ur schedule time and so u can display this...
-
U will have to write Windows Service which will check Birthday Dates everyday morning or ur schedule time and so u can display this...
-
I suspect the guy who answered you is joking, perhaps because what you're asking seems so straightforward. Yes, you can work out the age using DateTime.Now. And the DB gives you the dates to put in the date picker. So, which bit do you need help with ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
I suspect the guy who answered you is joking, perhaps because what you're asking seems so straightforward. Yes, you can work out the age using DateTime.Now. And the DB gives you the dates to put in the date picker. So, which bit do you need help with ?
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Thank you for your kindness.My problem is using the identity number from the database, i.e 840920 5993 081.I want to use this to establish when this person's birthday is.For example if its 841112 5993 081 then I should have a message that this person's birthday is today.And the same for those that celebrate tomorrow. Thank you so much again.
kagiso
-
Thank you for your kindness.My problem is using the identity number from the database, i.e 840920 5993 081.I want to use this to establish when this person's birthday is.For example if its 841112 5993 081 then I should have a message that this person's birthday is today.And the same for those that celebrate tomorrow. Thank you so much again.
kagiso
So you're starting with the person's Id and want to know if just that person has a birthday ? So you want SQL like select Birthday from person where id='845834534' you can add a check for if the birthday is today or tomorrow, but you still need to check in code if it's today, or if it's tomorrow, so you may as well do all your checking there. getdate() is how you get today's date in T-SQL. But be careful, if you have a time component to either of the two dates you're checking, they won't be equal. DateDiff may be a better way to go.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hello there guys.Im trying to use an aspx calendar and database to display birthdays.I have everyones ID numbers in the database so using that I want to display their birthdays on that specific day.For example today.I have to check everyone that celebrates today and display their names from a database. Please help guys.Thanx in advance
kagiso
Try this query from your database: SELECT Name from tablename where month(DOB)=month(getDate()) and day(DOB) = day(getdate()) God is always with you.
-
So you're starting with the person's Id and want to know if just that person has a birthday ? So you want SQL like select Birthday from person where id='845834534' you can add a check for if the birthday is today or tomorrow, but you still need to check in code if it's today, or if it's tomorrow, so you may as well do all your checking there. getdate() is how you get today's date in T-SQL. But be careful, if you have a time component to either of the two dates you're checking, they won't be equal. DateDiff may be a better way to go.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
What I have in mind is take the first six and say sumthing like select Birthday from Person where the "month and day" = today. Then display the results or the person's name. i.e. if the first six = 831112 then I will take the 1112 and check that.The problem is I dont knw how to go about doing that.Hope u understand me
kagiso
-
Try this query from your database: SELECT Name from tablename where month(DOB)=month(getDate()) and day(DOB) = day(getdate()) God is always with you.