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
subnet beginner ?
System Restore Points Not Created on Win 7
Slipstream all updates into new wim.image / win 7 install DVD
NAT setting and vmware
Exchange 2010 Rollup 3 Issues
Small Business Server Crital alerts
Public Desktop Icons not showing in RDP sessions
DataBinding: 'System.Data.Common.DataRe
cordIntern
al' does not contain a property with the name 'IdKeuze'.
Q945119 - storport.sys 5.2.3790.4189
Error: "The site <sitename> could not be found in the Web application SPWebApplication Name=MOSS Parent=SPWebService"