How to retrieve the ISO Date in PHP?

Ads
 

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

Ads









Related Tutorials/Questions & Answers:
How to retrieve the ISO Date in PHP?
Retrieve date from MYSQL database
Advertisements
ModuleNotFoundError: No module named 'phpy'
Retrieve Date Time Frm Database - Development process
How to retrieve the file status?
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to retrieve data from database ?????/
how to store,retrieve,modify the data
how to retrieve data from database
how to retrieve a checkbox value(retrieve from DB)
How to retrieve image from database
How to compare date in Java?
How to retrieve record from table
how to retrieve all id in elasticsearch
how to retrieve all id in elasticsearch
How to display date in JSP?
How to Convert String to Date?
how to add date and change date in java - netbeans
How to display date in JSP?
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 retrieve data from table with runtime values in sql?
How to display current date in textbox - Date Calendar
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?

Ads