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: Convert date to timestamp
PHP's strtotime() gives $timestamp = strtotime ( '22-09-2008' ); Which does work with the Supported Date and Time Formats D...
How to prevent SQL-injection in PHP
In the front-end development we validates the user input for invalid characters. If this is not validated and inserted without any modificat...
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...
Including another XHTML in XHTML using JSF 2.0 Facelets
Most basic way is <ui:include> . The included content must be placed inside <ui:composition> . Kickoff example of the master...
No comments:
Post a Comment