List:General Discussion« Previous MessageNext Message »
From:Patrick Calkins Date:May 29 2001 8:02pm
Subject:RE: [MySQL] DATE_FORMAT
View as plain text  
$Result = @mysql_query ("SELECT DATE_FORMAT(EventStartDate,'%M %D %Y') AS
EventStartDate FROM EventsTable");

$Row = mysql_fetch_array($Result);

printf("Event Date:%s", %Row['EventStartDate'];

Hope this helps :o)
--Patrick

# -----Original Message-----
# From: Tim Thorburn [mailto:webadmin@stripped]
# Sent: Tuesday, May 29, 2001 12:40 PM
# To: mysql@stripped
# Subject: [MySQL] DATE_FORMAT
# 
# 
# Hi,
# 
# I've setup a database to keep track of various events.  Now 
# I'm working on 
# displaying these events on the screen through a web browser.  
# I've got all 
# the crucial information displaying - now its time for a 
# little fine tuning.
# 
# All the dates in my database are ISO format, so YYYY-MM-DD, 
# I'd like to 
# display them in a more user friendly format.  For example, 
# there is an 
# event taking place this Wednesday, in ISO 2001-05-30 - I'd like it to 
# display as May 30th, 2001.
# 
# Through the command line, I know I do this by typing:
# select DATE_FORMAT(EventStartDate, '%M %D %Y');
# 
# My question is how would i get this information to display via PHP?
# 
# 
# ---------------------------------------------------------------------
# Before posting, please check:
#    http://www.mysql.com/manual.php   (the manual)
#    http://lists.mysql.com/           (the list archive)
# 
# To request this thread, e-mail <mysql-thread74988@stripped>
# To unsubscribe, e-mail 
# <mysql-unsubscribe-pcalkins=oemsupport.com@stripped>
# Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
# 
Thread
[MySQL] DATE_FORMATTim Thorburn29 May
  • Re: [MySQL] DATE_FORMATPaul DuBois29 May
Re:[MySQL] DATE_FORMATSam Masiello29 May
RE: [MySQL] DATE_FORMATPatrick Calkins29 May