Menu
Home
Recent Posts
Convert date format yyyy-mm-dd to dd-mm-yyyy
6:40 AM
0
Share
Use
strtotime()
and
date()
:
$originalDate
=
"2010-03-21"
;
$newDate
=
date
(
"d-m-Y"
,
strtotime
(
$originalDate
));
(see
strtotime
and
date
docs on the PHP site).
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Development and programming answers
Search articles
Popular Posts
PHP: MySQL vs Mysqli
More beyond that performance mysqli have others relevant features: If you have a look at MySQL Improved Extension Overview , it should tel...
PHP: Curly braces strings usage
They're used to escape variable expressions. From Strings : Complex (curly) syntax This isn't called complex because the syntax i...
How to: detect a click outside an element with jQuery
Attach a click event to the document body which closes the window. Attach a separate click event to the window which stops propagation to th...
How to: Calculate the difference between 2 dates in PHP
Input: Start Date : 2007 - 03 - 24 End Date : 2009 - 06 - 26 Output: 2 years , 3 months and 2 days Use strtotime() to conve...
PHP: Highlight difference between two strings
You can use the PHP Inline-Diff package . It suits your needs, and is quite customisable as well. It's also licensed under the GPL, so...
No comments:
Post a Comment