Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tips How to Convert date format yyyy-mm-dd => dd-mm-yyyy using PHP
#1
Convert date from YYYY-MM-DD to DD-MM-YYYY (and from DD-MM-YYYY to YYYY-MM-DD).
The timestamp which is used as a base for the calculation of relative dates.
Use strtotime() and date()
Code

Code:
$Date = "2018-01-25";
$newDate = date("d-m-Y", strtotime($Date));

To Purchase Credit Click here , For how to make money on Sologet forum Click here 

HIRE ME FOR WEBSITE DESIGNING US THE PM BUTTON TO SEND ME MESSAGE

There is love in sharing
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to Stop Sending E-Mail Spam using PHP mail function Kingsolomon 1 302 11-12-2018, 04:38 PM
Last Post: Solomon
  Multiple file upload in php Kingsolomon 1 280 11-08-2018, 03:01 PM
Last Post: Solomon
  How to limit text length in php and provide 'Read more' link Kingsolomon 0 297 10-31-2018, 02:08 PM
Last Post: Kingsolomon
  How to read more / hide text using Jquery and PHP Kingsolomon 0 255 10-31-2018, 02:06 PM
Last Post: Kingsolomon
  Download simple HTML email templates Kingsolomon 0 297 10-31-2018, 02:05 PM
Last Post: Kingsolomon

Forum Jump:


Users browsing this thread:
1 Guest(s)

How to Convert date format yyyy-mm-dd => dd-mm-yyyy using PHP00