Jump to content

Time stamps & comparing them


gerkintrigg

Recommended Posts

[code]<?php
$timestamp = time()-15768000;
$query = mysql_query("SELECT * FROM whatever WHERE date>='{$timestamp}'");
?>[/code]

Try something like that. I'm now sure if that is what you mean.

15768000 = 60*60*24*365/2 - which is a half year (six months).
14515200 = 60*60*24*7*4*6 (six months based on four weeks per month).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.