Re: how should MS Access DATETIME be handled in PHP?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/14/06, Bing Du <bdu@xxxxxxxxxxx> wrote:
> > While all the data-munging in PHP is very interesting...
> >
> > Might I suggest that you just use MySQL's date_format() function to
> > ask MySQL to give you the data you want in the first place?
> >
> > Some purists would claim that the database is not the place to put
> > presentation logic, of course.
> >
> > And for a large-scale library where other users might want to skin a
> > different format, I couldn't agree more.
> >
> > But, really, for a small project, K.I.S.S. wins out, and having MySQL
> > just hand you what you want instead of cluttering up your code with
> > several lines (or a long multi-operation line) of PHP, seems like a
> > cleaner solution.
> >
> > Not to mention that you'll have a lot less headaches like this one.
> >
> > http://mysql.com and search for "date_format"
>
> Thanks, Richard.  I agree with you.  Is date_format() a MySQL specific
> funtion?  If so, we're out of luck because our backend DB is MS Access.

Do the search as Richard suggested.

MS Access might have a similar function you can use, but you'll need
to do some searching yourself to find the answer.

--
Postgresql & php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux