THEME COLOR
I am trying to convert a date from yyyy-mm-dd to dd-mm-yyyy (but not in SQL); however I don't know how the date function requires a timestamp, and I can't get a timestamp from this string.
How is this possible?
Use Can Use strtotime() and date():
strtotime()
date()
$originalDate = "2010-03-21"; $newDate = date("d-m-Y", strtotime($originalDate));
(see strtotime and date docs on the PHP site).
Post Your Answers
How many types of PHP Operators. Describe it
How do you use bcrypt for hashing passwords in PHP?
Convert HTML + CSS to PDF with PHP?
Are you looking best training center for website and software in Kolkata
Different between HTML and PHP ?
How to get random value out of an array in php?
how to upload file in mysql database using php
PHP calculate age
Add 'x' amount of hours to date
बिहार किन किन खाद्य पदार्थो के लिए प्रसिध्द है?
mysql_fetch_array() expects parameter 1 to be resource (or mysqli_result), boolean given
Autocomplete search using php, mysql and ajax
When to use self vs $this in PHP Object Programming ?
how to create a login page with PHP and MySQL.
रेडियो और दूरदर्शन की तरंगे किन माध्यमों से हम तक पहुँचती है? लिखिए|
Why shouldn't I use mysql_* functions in PHP?
पॉलीथिन के विकल्प क्या - क्या हो सकते है?
भारत के राष्ट्रपतियों की सूची
Extract a substring between two characters in a string PHP
Using jquery validation plugin to validate multiselect box created using bootstrap multiselect plugin?
What is mysqLi and PDO, how to use it...?
लद्दाख क्षेत्र की जलवायु केसी है ?
आपके आस - पास कौन सा परितंत्र है ? चित्र बनाकर किसी एक का वर्णन कीजिये|
How to Auto Post on Twitter with PHP
How to get first 5 characters from string
जल का संरक्षण आवश्यक है| क्यों ?
बिहार की सांस्कृतिक विशेषताएं लिखिए|
How to list all files and folders in directory using PHP
When to use self vs $this?
What is arrays? How many types of Array in Programming Language and How is declared. Explain with Example
Your Answer