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
Android SDK installation doesn't find Java JDK
In order to fix this press Back when you get the notification and then Next . This time it will find the JDK.
PHP: Function eregi() is deprecated
eregi() is deprecated as of PHP 5.3, use preg_match() instead. Note that preg_match() is only case insensitive when you pass the i mo...
How to avoid writing Java code inside JSP files
When you are starting on JSP used to write something like this in your JSP code: <%= x + 1 %> <%= request . getParameter ( ...
How to: Remove duplicated elements from a bidimensional array PHP
Example array: Array ( [ 0 ] => Array ( [ 0 ] => abc [ 1 ] => def ) [ 1 ] => Array ( ...
How to solve: Parse error: syntax error, unexpected T_XXX
This happens when you have T_XXX token in unexpected place, unbalanced (superfluous) parentheses, use of short tag without activating it in ...
No comments:
Post a Comment