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
Python: How to sort dictionary by value
It is not possible to sort a dict, only to get a representation of a dict that is sorted. Dicts are inherently orderless, but other types, s...
Applying CSS to an iframe
There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style o...
Android: How to get screen width and height
If you want the display dimensions in pixels you can use getSize : Display display = getWindowManager (). getDefaultDisplay (); Point ...
Example PHP: cURL HTTP POST
You'll find php/curl examples here: http://curl.haxx.se/libcurl/php/examples/ , especially http://curl.haxx.se/libcurl/php/examples/simp...
Phyton: Slice notation
It's pretty simple really: a [ start : end ] # items start through end-1 a [ start :] # items start through the rest of the arra...
No comments:
Post a Comment