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
Angular JS: How to pass variables between controllers
One way to share variables across multiple controllers is to create a service and inject it in any controller where you want to use it. S...
Objective-C: How to make UIText move up when keyboard is visible
With the iPhone SDK: I have a UIView with UITextFields that brings up a keyboard. I need it to be able to: Allow scrolling of the c...
Objective-C: How to check if a string contains another script
To check if a string ( NSString ) contains another small string this is the code: NSString * string = @ "hello bla bla" ; if ...
iOS: performSelector may cause a leak because its selector is unknown
Here's what I'm doing: [ _controller performSelector : NSSelectorFromString (@ "someMethod" )]; The solution for this e...
No comments:
Post a Comment