![]() |
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 |
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.
|
I will assume the date format is mmddyyyy.
Thanks. |
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
|
All times are GMT. The time now is 10:57 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|