php date function



Share on Google+Share on Google+

php date function
1 Answer(s)      8 years ago
Posted in : Date-Calendar
View Answers

March 27, 2009 at 1:06 AM

Hi Friend,

Try the following code. It is working here on all the browsers.

$d = "1960-12-02";
$db= date("Y", strtotime($d));
echo $db;

Thanks for posting questions.
RoseIndia Team


Related Tutorials/Questions & Answers:
php date function - Date Calendar
php date function  Hi, I am new to PHP. I am trying to get date from database. But, every time the date under 1970, it changes to 1970. Im...: 1960-12-02 (type is date ) In PHP : $dob= " 1960-12-02
The PHP Date() Function
The PHP Date() Function The PHP date() function is used for formatting... date and time. No installation is necessary for using this function.  Syntax... formatting. For example: <?php echo date("Y/m/d") . "<br />
PHP Date function
PHP Date Function In this section we will show you the different formatting options available in the PHP Date function PHP date() function provides many...; it is tenth month of the year PHP Date formatting example code: <?php
PHP date function
PHP Date() Function PHP Date() function is used to display the date and time in a précised format.  With the help of PHP date function you can format... format is different. There are number of variety provided by PHP in date function
PHP date add function
PHP Add Date function - date_add or DateTime::add function The date_add... and seconds to a DateTime object. This function works in PHP 5.3.0 and above... amount. Example: <?php $date = new DateTime("24-Aug-2009 13:10
PHP date_create_from_format function
date_create_from_format  function The date_create_from_format function is also known as DateTime::createFromFormat. This function returns new... according to the specified format. Parameters format Format accepted by date
PHP Date Function with Example
program do as follows: Exmaple 1: <?php     echo date("l"); ?> Output: Tuesday In PHP date() is a predefined function... about date() function please visit our web page:
PHP date_create
date_create () date_create function returns new DateTime object. It returns DateTime object on success or returns FALSE on failure. This functions was introduced in PHP 5.1.0. Description DateTime date_create ([ string $time
If function in PHP
If function in PHP  Hi, Provide me the example of If function in PHP. Thanks   Hi, If function is PHP is used to check for some condition and the execute a block of code. He is an example of if() function in PHP
date function
date function  Write a JavaScript program to read a date from user and perform the following, if entered value is date then perform the following 1. Display the day no from the date 2. Display the year from the date 3. Display
PHP Set Date
DateTime::setDate DateTime::setDate alias date_date_set function is used for resetting the current date of the DateTime object to a different date. It returns... of the date. day - Day of the date. Examples <?php date_default
PHP Date
PHP Date  Hi, How to use PHP Date functions in my PHP program? Thanks   Hi, PHP Date functions is very handy. It is used to progracess, format and create date objects in PHP. There are many ways to use PHP Date
php date input calendar
php date input calendar  I'm having an issue while writing the date input calendar function in PHP.. any help? Thanks
Check Date in PHP
Check Date in PHP The Checkdate() The PHP Checkdate function is used for validating the system date. It validate the Gregorian date. It returns 'True' if finds the specified date valid, otherwise it returns false. Note
PHP Date and Time
PHP Date and Time The PHP Date and Time function is massively used... the functions of the software.  The PHP date and Time functions allow you to access the date and time from the server where your PHP scripts are running
Date comparison in PHP - PHP
Date comparison in PHP  I am looking for a date comparison code in PHP that can compare the date in between two different date formate.. for example: 11/12/1999 and 11/12/2001 to 11.11.1888 00:00:00 any idea on how
php array length function
php array length function  writing a php array length function
call function in php
call function in php  What is the call function in PHP please explain
php date format change
php date format change  How to change the date format in PHP
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP?   Go through the PHP Variable function tutorial ... PHP Variable Function
What is the microtime() Function PHP ?
What is the microtime() Function PHP ?   Hi, What is microtime() Function in PHP? What is the role of Microtime() Function in PHP. Please suggest me any online reference. Thanks
Eval () PHP Function, Example of Eval () PHP Function
PHP eval() Function In this tutorial we will learn about the PHP eval() function. The php eval() function can be used if you want to store the php command... eval() function: The PHP eval() function evaluates the passed string parameter
php error handling function
php error handling function  Is there any library or function that can be used to handle errors in PHP
post function php
post function php  when should i use post function in PHP
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP
Eval Function in PHP
Eval Function in PHP  Hello PHP experts, Please tell me about Eval() Function in PHP. How to use Eva() function in PHP? Thanks   Hi, The Eval() function is PHP is very handy. It allows to you store the PHP code
array_merge function in php - PHP
array_merge function in php  What is the best use of array_merge function in php?  Hi Friend, Please visit the following links: http
PHP Date Examples, PHP Date functions
The PHP Date function provides many options to the PHP programmer. It allows the developers to manipulate PHP Date in easy way. You will find many methods....   PHP Date function examples
Array Sizeof Function PHP
Array Sizeof Function PHP  Hi, How to count the number of elements in an array using the PHP Array sizeof() function? Please provides me online help links or example of array sizedof() PHP. Thanks
php date format validation
php date format validation  How to validate the date field in specific format in PHP
PHP idate() Function
help related to PHP idate() Function. I waiting for your valuable suggestion. Thanks,   Hi, The idate() Function in PHP will returns a string... time if no timestamp is given. Syntax of PHP idate() Function :... int idate