[CLUE-Tech] PHP or MySQL date handling problem
Lynn Danielson
lynnd at techangle.com
Thu Jun 13 16:42:15 MDT 2002
Jed S. Baer wrote:
> Or maybe rant ;-)
>
> I've run into a problem with PHP or MySQL (or both) with the handling of
> dates. The problem is that neither of them provides a generalized
> date/time parser that accepts a format string. <snip>
> PHP, likewise, provides no similar function. The strtotime function works
> with a variety of input strings, but again doesn't allow a user-supplied
> format string.
PHP's date() function allows you to format a Unix integer timestamp into
a string of your choice. It's very flexible and has met all of my needs.
You can use time(), strtotime() or mktime() functions to feed it timestamps.
Hope this helps,
Lynn
More information about the clue-tech
mailing list