Query and date as number
I have set query like:
[SQL] SELECT userid, usernamejoindate, lastactivity
AND joindate <1298937600
AND lastactivity - joindate < 1814400
How to set JOINDATE to my date as it is number?
See mktime() witch get Unix timestamp for a date. This timestamp is a long integer containing the number of seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time specified.
Not exactly sure what you want to convert to what, but MySQL has the FROM_UNIXTIME() and TO_UNIXTIME() functions for doing UNIX timestamp conversions in the SQL itself.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)