Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 25th, 2006, 08:10 AM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default mm/dd/yyyy to dd/mm/yyyy

Hi All,

This may be a pretty simple question but I've searched google and cant find the method to change a date fromat from mm/dd/yyyy to dd/mm/yyyy in PHP. I would like if I could also convert it to 22nd September 2006 format too....but the first conversion will do :-)

I've read this thread for an ASP solution: -
http://p2p.wrox.com/topic.asp?TOPIC_ID=28465

but im a bit lost with it.

hope you can help :-)

Thanks
Ash

My new web design domain
www.askmultimedia.co.uk
__________________
My new web design domain
www.askmultimedia.co.uk
 
Old September 27th, 2006, 06:31 AM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default

this board is .......d....e.....a.....d

My new web design domain
www.askmultimedia.co.uk
 
Old September 27th, 2006, 06:35 AM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default

the answer to this i found on SiePoint forum.......

<?
$olddate = "10/22/2006"; // Or any other valid date format
$newdate = date("l dS F Y", strtotime($olddate));
echo $newdate;
?>

This will change any date into any other format...really simple and really cool!

My new web design domain
www.askmultimedia.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert dd/MM/yyyy to MM/dd/yyyy Rg2005 VB.NET 2002/2003 Basics 2 November 7th, 2008 06:42 PM
regular expression for dates in dd/mm/yyyy abhishekkashyap27 Javascript How-To 3 June 12th, 2008 08:43 AM
Date dd-mm-yyyy John2112 SQL Server 2000 2 March 16th, 2007 05:15 AM
convert "MM/dd/yyyy" to "dd/MM/yyyy" xin56 General .NET 4 March 28th, 2005 05:33 AM
Date formats... dd/mm/yyyy SeanW Classic ASP Databases 3 June 14th, 2004 12:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.