0
Explorer
,
/t5/dreamweaver-discussions/php-mysql-date-display-format/td-p/630297
Mar 13, 2007
Mar 13, 2007
Copy link to clipboard
Copied
Can someone help me out here. I am trying to format my date.
My MySQL is a "datetime". How ever I would like to display only the
month, day, year like so "Jan,15,2007"
Here is my current code, what should I add to make it do what I want.
<?php echo $row_Recordset1['review_date']; ?>
Thanks
Here is my current code, what should I add to make it do what I want.
<?php echo $row_Recordset1['review_date']; ?>
Thanks
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
LEGEND
,
Mar 13, 2007
Mar 13, 2007
Try this:
<?php echo Date("M d, Y", strtotime($row_Recordset1['review_date'])); ?>
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"newhorizonhosting.com" <charles@dieselinteractive.com> wrote in message news:et7lf6$q8a$1@forums.macromedia.com...
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
>
> Here is my current code, what should I ad...
<?php echo Date("M d, Y", strtotime($row_Recordset1['review_date'])); ?>
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"newhorizonhosting.com" <charles@dieselinteractive.com> wrote in message news:et7lf6$q8a$1@forums.macromedia.com...
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
>
> Here is my current code, what should I ad...
LEGEND
,
/t5/dreamweaver-discussions/php-mysql-date-display-format/m-p/630298#M193809
Mar 13, 2007
Mar 13, 2007
Copy link to clipboard
Copied
Try this:
<?php echo Date("M d, Y", strtotime($row_Recordset1['review_date'])); ?>
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"newhorizonhosting.com" <charles@dieselinteractive.com> wrote in message news:et7lf6$q8a$1@forums.macromedia.com...
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
>
> Here is my current code, what should I add to make it do what I want.
>
> <?php echo $row_Recordset1['review_date']; ?>
>
> Thanks
>
<?php echo Date("M d, Y", strtotime($row_Recordset1['review_date'])); ?>
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"newhorizonhosting.com" <charles@dieselinteractive.com> wrote in message news:et7lf6$q8a$1@forums.macromedia.com...
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
>
> Here is my current code, what should I add to make it do what I want.
>
> <?php echo $row_Recordset1['review_date']; ?>
>
> Thanks
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/php-mysql-date-display-format/m-p/630299#M193810
Mar 14, 2007
Mar 14, 2007
Copy link to clipboard
Copied
On Wed, 14 Mar 2007 02:08:38 +0000 (UTC),
"newhorizonhosting.com"
<charles@dieselinteractive.com> wrote:
>Can someone help me out here. I am trying to format my date. My MySQL is a
>"datetime". How ever I would like to display only the month, day, year like so
>"Jan,15,2007"
You should format it using your SQL statement. See this:
http://www.dan.co.uk/mysql-date-format/
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
<charles@dieselinteractive.com> wrote:
>Can someone help me out here. I am trying to format my date. My MySQL is a
>"datetime". How ever I would like to display only the month, day, year like so
>"Jan,15,2007"
You should format it using your SQL statement. See this:
http://www.dan.co.uk/mysql-date-format/
--
Steve Fleischer
steve at flyingtigerwebdesign dot com
Hong Kong
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/php-mysql-date-display-format/m-p/630300#M193811
Mar 14, 2007
Mar 14, 2007
Copy link to clipboard
Copied
newhorizonhosting.com wrote:
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
mysql> SELECT DATE_FORMAT(NOW(),"%b %e, %Y") as review_date;
+--------------+
| review_date |
+--------------+
| Mar 14, 2007 |
+--------------+
1 row in set (0.00 sec)
Best done in mysql.
Mick
>
> Here is my current code, what should I add to make it do what I want.
>
> <?php echo $row_Recordset1['review_date']; ?>
>
> Thanks
>
> Can someone help me out here. I am trying to format my date. My MySQL is a
> "datetime". How ever I would like to display only the month, day, year like so
> "Jan,15,2007"
mysql> SELECT DATE_FORMAT(NOW(),"%b %e, %Y") as review_date;
+--------------+
| review_date |
+--------------+
| Mar 14, 2007 |
+--------------+
1 row in set (0.00 sec)
Best done in mysql.
Mick
>
> Here is my current code, what should I add to make it do what I want.
>
> <?php echo $row_Recordset1['review_date']; ?>
>
> Thanks
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

