Subtract "x" amount of minutes from that timestamp. This also needs to be in TIMESTAMP form when all is said and done.
Thanks!
blang
5:24 am on Mar 31, 2009 (gmt 0)
Are you referring to a UNIX TIMESTAMP, e.g. the number of seconds from the "epoch" (Jan 1, 1970 00:00:00UTC)? It's just in seconds, so figure out how many seconds X represents and subtract it from the current UNIX TIMESTAMP value.
[edited by: blang at 5:25 am (utc) on Mar. 31, 2009]
coopster
3:27 pm on Mar 31, 2009 (gmt 0)
If it is in TIMESTAMP form, can we assume it is coming from a database? If so, I would use the database to do the subtraction.
It will not originally come from the database, it needs to come from the current time; however, after the subtraction it will end up being put into a database.
coopster
10:27 pm on Mar 31, 2009 (gmt 0)
So if it is coming from the current time then you know it is not user-supplied, it's just right off your system -- use the example above to populate the field in your database.
"INSERT INTO table (myTimeColumn) VALUE(CURRENT_TIMESTAMP - INTERVAL $minutes MINUTE)"