Jump to content

Archived

This topic is now archived and is closed to further replies.

aviatorisu

"This Date in History" script...

Recommended Posts

Anyone out there got something like this?  I want a script to recognize the Month and day and then compare it against database entries for events that happened on the same date through history.  I'm not very good when it comes to the whole "date" thing or I could probably get it myself.  Any help would be appreciated.

Thx,

~Z~

Share this post


Link to post
Share on other sites
that is a realy rather simple. I think that you are trying to over think this one. I often do this my self.

Are you wanting to search by month or day or both?

Share this post


Link to post
Share on other sites
Not even a search.  Just something to display in a small box on the front page of my site.  Something like this:

[img]http://www.lasvegas247.net/date.jpg[/img]

I think it always helps me if I can just see an example.  Lots of things I can work out for myself if I just sit down long enough, but like I said, the whole date format thing screws me up.

~Z~

Share this post


Link to post
Share on other sites
SELECT whatever, (YEAR(CURDATE())-YEAR(event_date)) as years_ago
FROM event_table
WHERE MONTH(event_date) = MONTH(CURDATE())
AND DAY(event_date) = DAY(CURDATE())

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.