473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

birthday date problem

Hello,

I've read and used the birthday solutions of Wolfgang Führer from the mySQL
DATE examples on the mysql.com website.

SELECT naam, gebdatum FROM users WHERE gebdatum != '0000-00-00' AND ((
DAYOFYEAR(gebdatum) < DAYOFYEAR(now()) )*366)+DAYOFYEAR(gebdatum) >=
DAYOFYEAR(now())ORDER BY (( DAYOFYEAR(gebdatum) <
DAYOFYEAR(now()) )*366)+DAYOFYEAR(gebdatum)

But I discover a problem:
When you have birthdates in your table in the same month, not on the same
day but before 1970 and after 1970. The query result give first the bithdays
after 1970 and then the ones before 1970.

For example:
Ria | 1947-03-20
Linda | 1967-03-22
Esther | 1977-03-24
Agnes | 1978-03-24
Frans | 1944-03-23
Annie | 1936-03-25
Wendy | 1977-03-26

Does anyone discoverd the same problem and is there a solution for this?

Best Regards,
Peter
Jul 19 '05 #1
0 1353

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

Similar topics

0
by: Peter Ruijter | last post by:
Hello, I've read and used the birthday solutions of Wolfgang Führer from the mySQL DATE examples on the mysql.com website. SELECT naam, gebdatum FROM users WHERE gebdatum != '0000-00-00' AND...
51
by: Sandra | last post by:
I was given this problem for extra credit and I am just stuck ! BTW - I am not asking for source code and I am not asking anyone to do my homework as I do want to learn .. I just need a hint or two...
2
by: edwin van rutten | last post by:
Hi I have a personal database of all adresses etceteras of personal contacts and want to sort the birthday dates in such a way that I have a chronological list for this years birthdays. The...
7
by: Adrian | last post by:
I hit on this problem converting a VB.NET insurance application to C#. Age next birthday calculated from date of birth is often needed in insurance premium calculations. Originally done using...
2
by: David Garamond | last post by:
What would be the more proper way of storing birthday data? It will be used to send out birthday messages for customers ("Happy 30th birthday, Sam!"). But the date of birth is not necessarily known...
5
by: NomoreSpam4Me | last post by:
Hi, i did a search and find the way to get the birthday without the year. My field is yyyy/mm/dd, (birthday). I also have a day field (1 to 31) and a month field. (1 to 12) My problem is: I...
2
by: Paul H | last post by:
I have a db that stores people and their birth dates. On any given day, I need to know who has a 40th birthday one month from now. I will only be running the query on week days but of course some...
13
kestrel
by: kestrel | last post by:
Sheila and He-Man are twins; Sheila is the OLDER twin. Assume they were born immediately after each other, an infinitesimally small - but nonzero - amount of time apart. During one year in the...
1
by: stilldancin12 | last post by:
Ok so i have to write an application that asks for the users birthday and replies with they day of the week in which he or she is born on, using the java program. This is what I have so far.It gives...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.