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? I'm
having a difficult time figuring out how to reconcile the date in MySQL so
it works with PHP's various date commands, like getdate().
Any
:06 PM
Subject: [PHP] PHP/MySQL -- Date/Time Confusion
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? I'm
having a difficult time figuring out how to reconcile the date in MySQL so
it works
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
4 matches
Mail list logo