473,889 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Birthdays in ASP.NET

Hi

I have limited experience with ASP.NET but have had an idea for a
functionality I would like to add to our intranet site.

I would like to put an announcement on the front page when a member of staff
has a birthday by searching through the staff db (around 250) for a match of
todays date.

I am not expecting a full listing but any pointers would be welcomed (I
already have the connect string I can use from another form)

Regards

Mark

Aug 31 '07 #1
1 1108
"Mark Scott" <ma********@blu eyonder.co.ukwr ote in message
news:19******** *************** ***********@mic rosoft.com...
I have limited experience with ASP.NET but have had an idea for a
functionality I would like to add to our intranet site.

I would like to put an announcement on the front page when a member of
staff has a birthday by searching through the staff db (around 250) for a
match of todays date.

I am not expecting a full listing but any pointers would be welcomed (I
already have the connect string I can use from another form)
Fetching the data is simple enough... You don't specify which RDBMS you're
using, so I'll assume you're using SQL Server....

SELECT * FROM StaffTable
WHERE DAY(DateOfBirth ) = DAY(getdate())
AND MONTH(DateOfBir th) = MONTH(getdate() )

Fetch the data into an ADO.NET object (e.g. DataSet or SqlDataReader) and
iterate through it as required...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2452
by: Stijn Goris | last post by:
hi all, I have this problem that I cant solve. I have created an agenda (http://28edegem.scoutnet.be/agenda.php) . The agenda contains events and birthdays of the members. I query the events and birthdays per month and sort them on date. This method works fine for the events since they are all for the same year (eg 2003) but doesnt work for the birthdays because someone born in 1980-06-23 will be sorted before someone born in...
4
2332
by: Tarscher | last post by:
Hi all, I have a l list of persons and birthdays (stored as a date eg: 1980-07-11). I want to query the 4 first persons that will have their birtday. Can this be done via query? Thanks in advance Stijn
2
4520
by: Chandrashekara Adiga | last post by:
hi This is particular to Containment classes .. ( just taking an example from rougewave ) Can someone point out How destrutor of new RWDate(2, "Nov", 1980) will be called? Is is our responsibilty to call it or such container after deleting the list element calls the destuctor also .
7
16226
by: Fred Thompson | last post by:
I'm using MS SQL 2000 server. I have a table which includes a date field which has people's birthdays in it. How can I write a query to return all the records of people with birthdays within the next 30 days? (Based on system date as the starting point.) Actual year of birthday is irrelevant. Also the next 30 days may span into the next month, or the next year.
3
1754
by: ClassicNancy | last post by:
I have this mod for my forum and it calls the birthdate from the database. I would like to have it not see the year. What is happening if a person puts a year in the box in their profile it makes it Dec 31st because that year is already over. There is no way to remove that box from the code according to the forum tech people. I've added the two pieces that refer to date. It already is written where it only shows the month and day in the...
0
1015
by: ClassicNancy | last post by:
I have this mod for my forum and it calls the birthdate from the database. I would like to have it not see the year. What is happening if a person puts a year in the box in their profile it makes it Dec 31st because that year is already over. There is no way to remove that box from the code according to the forum tech people. I've added the two pieces that refer to date. It already is written where it only shows the month and day in the view. ...
3
1602
by: Bo Wisén | last post by:
In a MYSQL database I have stored when the members were born in the form "YYYYMMDD". Now I want a method to select every member who has birthday from today and up to 30 days into the future. I would prefer if this could be done in a MYSQL query. Can anyone tell me how to do this? I have figured out some solutions that will work, but unfortunately not in December because the year will turn. / Bo
4
1808
by: HariKutty | last post by:
Hello every one, I am working in Asp.Net 2005 web Application.I am storing my employees Details in the Database that includes there Birthday dates,Emailid.So my task is automatically mail should be sent the particular employee whose birthday matches with the current server date.how can i implement this in VS2005 ???. can anyone help me out.
6
7596
by: onlyshanks28 | last post by:
Hi I have a database birthday containing name and DOB, I want to find the query which can display 3 latest birth day. I tried select name,date from birthday where month(dob)>=month(curdate()) limit 3; But the problem here is that on 31-December-2008 it will not display the birthdays on January.
0
9962
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10442
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7150
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5829
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4647
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3256
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.