The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
MySQL date format
I want to run a query to identify all members that have visited my site in the last 2 years. But when I look at the date, it makes no sense to me. MySQL client version is 5.5.23. The date fields are defined as int(11), which I guess is normal.
What format of a date do I need to use in my query? Thanks. Ray |
#2
|
|||
|
|||
The date is stored as a unix timestamp, which is seconds since Jan 1 1970. You can use the mySQL functions UNIX_TIMESTAMP() or FROM_UNIXTIME() in your query to compare the field to a date string.
|
#3
|
|||
|
|||
I will assume the date format is mmddyyyy.
Thanks. |
#4
|
|||
|
|||
I think there's a number of different date/time string formats that UNIXTIME_TIMESTAMP() is able to interpret: http://dev.mysql.com/doc/refman/5.0/en/datetime.html
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|