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

No comments posted yet

Your Answer:

Login to answer
216 Like 11 Dislike
Previous forums Next forums
Other forums

add text and number image
hi guys ..

ok see i want the user to add their name and pick a number then click get it and i

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Troubles with a spider class
I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, w

Date Question
I'm using the TIMESTAMP() function within mysql to set the date/time for certain events. However, ho

ASP.NET Validation Event Cycle
Hi,
I have asp button as follow:

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

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