View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 07-20-2011 , 08:21   Re: How to get date from database ?
Reply With Quote #2

It would be easier to work with unix timestamps. You can save a unix timestamp
as int in the database. then you just subtract the current time with the saved time and you have the seconds which you can calculate into days.

MySQL Date should be possible too but then you better do the day calculation with MySQL functions.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline