» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-19-2006, 09:48 AM
bamby bamby is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
bamby is on a distinguished road
Default date formatting

I need to format a MySQL date field. For example, 2006-08-20 into August, 20th.

Code:

date("F, jS", $row['date'])

But this returns DECEMBER, 31ST.

What is the problem and please supply the answer -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-19-2006, 09:50 AM
christopher christopher is offline
OSP Starters
 
Join Date: Apr 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
christopher is on a distinguished road
Default

There are two reasons
  1. $row['date'] is coming up empty, null, or 0 so it assumes Epoch
  2. MySQL has built in date formatting features, use 'em!
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL Select Date comparisons functions? features? rice MySQL Forums 1 08-22-2006 01:21 PM
date formatting? Luz MySQL Forums 1 08-09-2006 07:09 AM
row type to keep formatting strauss MySQL Forums 1 07-30-2006 09:43 AM
page crawling date? curtley Yahoo 4 03-23-2006 11:52 AM
Need to change a Date String johny ASP forums and Tips 1 12-08-2005 06:09 AM


All times are GMT. The time now is 04:33 AM.