Hello all, I'm currently having to teach myself PHP on the fly for a project, and have run into a tough problem. Was hoping I could get some assistance.
Currently, I am writing a page that will be taking a Date field from a MySQL Database (datatype of Date), and comparing it to the current date. As of now, I have found how to bring in the time, convert it to a timestamp, and do math/manipulation on it though searches on these forums and others on the Internet.
My problem is that I need to compare JUST the day and month part of the date, which I cannot seem to do with just the timestamp.
Basically, my question is: How can I perform mathematical operations, and comparisons on JUST the day and month part of a date? I'm currently using "strtotime()" to convert the date to a timestamp, and "strftime()" to display it back as a normal readable date.
Thanks for any advice and help.
Currently, I am writing a page that will be taking a Date field from a MySQL Database (datatype of Date), and comparing it to the current date. As of now, I have found how to bring in the time, convert it to a timestamp, and do math/manipulation on it though searches on these forums and others on the Internet.
My problem is that I need to compare JUST the day and month part of the date, which I cannot seem to do with just the timestamp.
Basically, my question is: How can I perform mathematical operations, and comparisons on JUST the day and month part of a date? I'm currently using "strtotime()" to convert the date to a timestamp, and "strftime()" to display it back as a normal readable date.
Thanks for any advice and help.