in reply to dbi and dates
$sth = $dbh->prepare (qq{SELECT article_title, article_author, DATE_FORMAT(article_date, '%W %M %D %Y') as my_date, article_body from news_articles where article_id = ?}); $sth->execute($article); $sth->bind_col (1, \$article_title); $sth->bind_col (2, \$article_author); $sth->bind_col (3, \$article_date); $sth->bind_col (4, \$article_body); $sth->fetch;
article_date in this case, is a DATETIME field in MySQL, and presents itself with a date stamp similar to:
2001-09-22 17:09:20
The above code lets me present that date in a more human-readable format, as:
Saturday September 22nd 2001
Does that help you a little?
|
|---|