Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP How to retrieve the ISO Date in PHP?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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


Hi,

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.

Thanks,


Advertisement
View Answers

February 9, 2011 at 10:39 AM


Hi,

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...

<?php
date_default_timezone_set('India/Kolkata');

$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:
Advertisements
 

 

 

DMCA.com