You are here: date_format with MySQL and PHP « PHP SQL « IT news, forums, messages
date_format with MySQL and PHP

Posted by mpar612 on 08/07/06 12:17

Hello everyone,

I am having some difficulty with the date_format function in MySQL. I
have an 'add_date' column in my database as a timestamp type. This
automatically adds the current date and time when a user submits a
form. I am using PHP and trying to format the date.

I am using the following query:

SELECT isbn, artist_name, album_title, release_date,
date_format(\'add_date\', \'%M %d %Y\'), description, price FROM lounge

When I run this query my date returns null.

If I run the following query, the standard timestamp formatting is
returned:

SELECT isbn, artist_name, album_title, release_date, add_date,
description, price FROM lounge

Am I making an error with my query?

Thanks!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация