News:

Join the Facebook Fan Page.

Main Menu

Data Dictionary

Started by aharmon, July 28, 2010, 01:35:32 PM

Previous topic - Next topic

aharmon

Does a data dictionary exist for the tables?  I'm trying to figure how out what format the last login is stored in smf_members and how to convert it to a meaningful date/time stamp.  When I pull this information with SQL, it is displaying a value of 1280331395 for the date of 07/28/2010.  Any ideas how to convert this string value?

ɔɔɔɔɔɔuɥoɾ

I believe its some kind of encryption, the quote tags use this too, maybe looking into how the quotes are displayed can help you decrypt it (if its the same thing)

However, I'm not sure of this, but it does seem that way.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

CapadY

#2
The value stored in the member tables are the seconds, gone since january 1, 1971 at 00.00.00 hour

So, 1280331395 =

1280331395 /60 = 21338856 minutes after 1971 / 60 = 355647 hours after 1971 /24 = 14818 days after 1971 /365.25 = about 40,5 years after 1971

It's not an correct result because a year doesn't have always the same amount of days.

By the way, php have a lot of functions to find the right values.
i.e. date('Y', 1280331395) will give you the year this value means. So you can also find the month day, day of week, time, am or pm, 12/hr or 24/hr system, you can use dst, there are an awfull lot of possibilitys.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

aharmon

Is there an SQL function to convert this to a correct date/time value?  I'm trying to graph the number of users based on last login date.  I'm mainly interested in the YY-MM-DD format.

CapadY

Go to the online php-manual and look for date(), gettime() or makedate() functions.

www.php.net
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Advertisement: