How to retrieve the ISO Date in PHP?

How to retrieve the ISO Date 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,

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:
How to retrieve the ISO Date in PHP?
What is the difference between PHP4 and PHP5?
Advertisements
ModuleNotFoundError: No module named 'phpy'
php code: how to insert manual date and also retrieve records by selecting date field. - Date Calendar
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
How many ways we can retrieve the date in result set of mysql using php?
Retrieve date from MYSQL database
Retrieve Date Time Frm Database - Development process
Retrieve records based on date - Development process
how to retrieve link - JSP-Servlet
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
New features in PHP5?
ModuleNotFoundError: No module named 'iso'
How to retrieve the file status?
how to retrieve a checkbox value(retrieve from DB)
how to store,retrieve,modify the data
how to retrieve data from database
How to retrieve image from database
how to retrieve all id in elasticsearch
How to retrieve record from table
how to retrieve all id in elasticsearch
ModuleNotFoundError: No module named 'iso-forest'
ModuleNotFoundError: No module named 'iso-forest'
ModuleNotFoundError: No module named 'ryo-iso'
ModuleNotFoundError: No module named 'simple-iso'
ModuleNotFoundError: No module named 'filters-iso'
ModuleNotFoundError: No module named 'iso-distributions'
ModuleNotFoundError: No module named 'iso-forest'
how to use bean to retrieve data from database
How to retrieve image from database in Servlet?
How to Retrieve Data from Facebook Using PHP
How to Retrieve Data from Facebook Using PHP
how to add date and change date in java - netbeans
How to compare date in Java?
how to retrieve data from table with runtime values in sql?
How to retrieve and display image from database in Java?
how to retrieve blob data - JSP-Servlet
How to retrieve blob image from database in JSP?
How to store and retrieve image from database in JSP?
How to display date in JSP?
how to get current date without system date
How to Convert String to Date?

Ads