Here's an example (which I happened to have in my notes). It displays users who registered within the last seven days. <br /> <br /><pre><font class="small">code:</font><hr>SELECT U_Username,FROM_UNIXTIME(U_Registered),(UNIX_TIMESTAMP()-U_Registered)/(3600*24) <br />FROM w3t_Users <br />WHERE (UNIX_TIMESTAMP()-U_Registered)/(3600*24) < 7</pre><hr> <br /> <br />The date/times in the database represent the number of seconds from the "epoch", which I think is Jan 1, 1970. <br /> <br />For more details, see
MySQL Date and Time Functions.
_________________________
UBB.threads beta tester / threadsdev.com moderator
Software consulting services including UBB.threads problem resolution / installs / upgrades / customization.