mysql timestamp manipulation


Posted on 16th Feb 2014 07:03 pm by admin

How could I use a timestamp (e.g 2009-10-30 13:20:35 ), and with php find out if it is:

from today
from this week
from this month
from the last 3 months
from the last 6 months
from this year
from 1 year ago
etc etc

?

Thanks

216 Like 11 Dislike
Previous php-forum Next php-forum
Other php-forum

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

ereg_replace()
Basically what i need to do is

$title = "This Suck's"

$striped = ereg_repl

query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:

Code: [Select]$query

Mail Form receiving emails with no content
Hi, I hope someone here can help me.
I have a simple form in my website, it was working OK, after

How to return to a previous page after running a PHP script
I'm having a bit of a melt down here because I think this should be really easy but can't work it ou

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

Can't find a decent web analytics!!!
I've downloaded and installed Piwik. It's location detection based on IP addresses is fairly inaccur

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash