You've got all kinds of options. I suggest you do any date calculations in
the database and use DATE_FORMAT to format any dates pulled out. It's
exactly like the date() function in PHP. MySQL has some great date and time
functions so you can select out exactly what you want. You can use the
Which method is the best way to store date/time in MySQL and
then which PHP
command is the best to use to convert that date to something
useful?
Get comfortable with MySQL's date functionality and you'll find that you
don't often need to do the date comparisons and manipulation in php
The easiest and my preferred way is to use strtotim method.
This method accepts MySQL format 2002-12-23 and converts it into a UNIX time stamp.
After that you can use the date function to format time as you wish!
Monty [EMAIL PROTECTED] wrote: Which method is the best way to store date/time
3 matches
Mail list logo