Question: How to retrieve the ISO Date in PHP?



Share on Google+Share on Google+

Nadeem Kumar
How to retrieve the ISO Date in PHP?
1 Answer(s)      6 years and 3 months ago
Posted in : PHP


I am a beginner in PHP programming language. I have a query how to retrieve the ISO Date in PHP Language. Can any one suggest any reference for this.


View Answers

February 9, 2011 at 10:39 AM


Are you looking for the syntax of how to fetch ISO Date Format in PHP? By using this DateTime::setISODate() function you will be retrieve the ISO Date from the specific date. For details look below example of the ISO date function in PHP ...

Examples of ISO Date Function in PHP...


$datetime = new DateTime();

// Offset from start of week 2 (7) = 5
$datetime->setISODate(2009, 2, 5); // Day 5 of week 2 of 2009 is the 9th of January. 

// Offset from start of week 2 (7) = 10
$datetime->setISODate(2009, 2, 10); // Day 10 of week 2 of 2009 is the 14th of January.


Related Tutorials/Questions & Answers:
Java Spring Hibernate Struts Training I am Java programmer. Should I learn Java Script or Python? Delete multiple records with pagination by selecting checkboxes How to add one hour in php date? connection in php connection in php connection in php PHP magento how to make previous and next Button Display Data in php session written exam display database results question create a simple form Magento Strings in PHP Zend Framework Installation in xampp? How to prevent adding duplicate items to the shopping cart php problem maximum execution time of 30 seconds exceeded in php Call-time pass-by-reference has been removed in HTTP_POST_VARS is deprecated $_GET[] index is not defined Function mysql_db_query() is deprecated Function mysql_db_query() is deprecated Function split() is deprecated Fatal error: Call to undefined function session_register() in .php file php tag not working Error reporting in PHP Why are MySQL Routines and Views not used with PHP? How to add Click to copy function to my wordpres blog? connection of php to MySQL. loan calculator Datepicker not getting called through include function of php change url string integrate login in php Installation of wamp server Display PHP clock with user input date and time value in div from php, reloading form pre-populate form developing a system using php n mysql Configure apache Tomcat to work with Eclipse and PDT in php How to display a file for 24 hours? LOGIN ERROR LOGIN FAILED", $_SESSION['login fail']='0',}?> I GOT ERROR FOR MY PROJECT PHP Sending emails and insert into trable Tutorial college Student Admission System PLZ HELP ME. i need php code.


Advertisement null