Microsoft
Software
Hardware
Network
Question : Date and time span in MySQL
Hi,
I have a filed in my database table called 'newsdate' which contains a unix time of when a news Item is added. I have categorized my menu into Months of a year, so when a user selects $month=4 and $year=2009, I want to enter these two variables into an SQL statement which will return all articles that where entered on the 4th Month of 2009 for example. Can anyone tell me how I may achieve this please?
Thank you in advance
Answer : Date and time span in MySQL
You can use MONTH() and YEAR() functions in MySQL, so
SELECT * FROM table WHERE MONTH(newsdate) = 4 AND YEAR(newsdate) = 2010
Random Solutions
VBA Convert long date format to short date
Server security analysis to determine patch level
Discrete Math, Big O, Little o
IPad / iphone, activesync issues with Exchange 2003 + ISA 2006
wcf upload size limitation
Add DC to Windows Server 2003 Network - error msg
Sonicwall E5500 bandwidth/shaping vs Packetlogic PL5600
is there a way to export GFI webmonitor Rules on isa 2006 for webgrade filter
ssh 1.99 vs 2.0
VBA Syntax Help