php date function

php date function

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. ADS..., sunrise and sunset components. ADS_TO_REPLACE_6 PHP Date() - Adding
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... of the year PHP Date formatting example code: <?phpADS_TO_REPLACE_5
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... provided by PHP in date function. Also, PHP provides number of functions
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... the letter (NOT P or T) can be any amount. Example: <?php $date = new
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
: Tuesday In PHP date() is a predefined function which returns a string value, depends on the parameter passed. To know more about date() function please visit... Write simple program to display the current date To develop the first
If function in PHP
If function in PHP  Hi, Provide me the example of If function in PHP. ThanksADS_TO_REPLACE_1   Hi, If function is PHP is used to check... of if() function in PHP:ADS_TO_REPLACE_2 $book="PHP"; if($book=="PHP"){ echo "Book
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
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 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.... month - Month of the date. day - Day of the date. Examples <?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 date input calendar
php date input calendar  I'm having an issue while writing the date input calendar function in PHP.. any help? Thanks
php array length function
php array length function  writing a php array length function
Check Date in PHP
Check Date in PHP The Checkdate()ADS_TO_REPLACE_1 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
call function in php
call function in php  What is the call function in PHP please explain
PHP Date and Time
PHP Date and Time The PHP Date and Time function is massively used... the functions of the software. ADS_TO_REPLACE_1 The PHP date and Time functions allow you to access the date and time from the server where your PHP scripts
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
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
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
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
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? ThanksADS_TO_REPLACE_1   Hi, The Eval() function is PHP is very handy. It allows to you store
php date format change
php date format change  How to change the date format in PHP
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 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
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:ADS_TO_REPLACE_1
php date format validation
php date format validation  How to validate the date field in specific format in PHP
What is the functionality of MD5 function in PHP?
What is the functionality of MD5 function in PHP?  What is the functionality of MD5 function in PHP
php function call
php function call  I have an function in error-status.php like this function validateHostName($hostName) { if((strpbrk($hostName,'`~!@#$^&... to cal this function in my other page which is datetime.php how it is posible
current date in php
current date in php  PHP script to get current date.   Hi... <?php echo date('y m d'); ?> With the help of following code you can get...; Today is: <?=$today?> More tutorial on PHP date are available at: http
Current date in php
Current date in php  How to show the current date in the HTML page using PHP Script
How to use the PHP filetype() Function
How to use the PHP filetype() Function  Hi, What is the use of filetype() Function in php programming. Can anyone give any online example of the PHP filetype() Function. Thanks
php inserting date into mysql
php inserting date into mysql  php inserting date into mysql   Here is a php code that inserts date into mysql database. In the given code, data is a database table. <?php table $query_manual = "INSERT INTO data
How to convert date to time in PHP?
How to convert date to time in PHP?  Hi, programmer. The PHP... and time. The PHP "time()" function is used to get the current Unix timestamp..., but as a readable date and time, it leaves much to be desired. Luckily, the PHP
php parse string to date
php parse string to date  In my app i have a date string in the following format: $date = "08/20/2009"; Can you suggest how can i separate each part of the date
php timezone function
php timezone function  how can i change the timezone using PHP
The PHP fileatime() function , fileatime php, fileatime in php
by the date function Code for fileatime() Function PHP <?phpADS_TO_REPLACE_3... Example of fileatime() function in PHP DescriptionADS_TO_REPLACE_1 Syntax for fileatime() Function PHP int fileatime ( file_name ) It returns Last
PHP filemtime() Function and examples
form of the file Use Date() function to change it to proper format PHP filemtime() function Example <?php     $time = time();     echo "current date and times is ".date("m/d/y H:i:s ", $time
PHP file_get_contents() Function
PHP file_get_contents() Function  Hi, How do i read the content of file using PHP program? So kindly provide any example or online help reference for filegetcontents() Function in PHP. Please feel free to suggest. Thanks
PHP strtotime, PHP strtotime Function, strtotime Function, strtotime Function Example
PHP strtotime Function In this section we will learn strtotime with the help... of strtotime() function: <?php echo strtotime("now"); ?> The above... time stamp of the date 10 January 2010. <?php echo strtotime("+2
date_modify() in PHP date_modify or DateTime::modify function modifies... , string $modify ) Parameters of Date Modify Function PHP object..._TO_REPLACE_1 <?php   $date = new DateTime("2009-08-25");ADS
The fgetcsv function example in PHP, fgetcsv php, fgetcsv in php
Examples of fgetcsv() function in php DescriptionADS_TO_REPLACE_1 The PHP fgetcsv() function is used to parse the CVS file in PHP program. Here you...() function. Syntax of fgetcsv() Funtion in PHP Program Array fgetcsv ( file_handler
PHP basename() function, PHP basename function example
In this section we will learn about the basename() function of php This example of basename()  function in PHPADS_TO_REPLACE_1 Description about PHP basename(): syntax for PHP basename()Function string
How to Declare fflush() Function in PHP
How to Declare fflush() Function in PHP  Hi, Can someone give my any online example for write all the buffered data of an open file. Is it appropriate to use the PHP fflush() Function to develop this application? Please suggest
php date format am pm
php date format am pm  how to set the date format that will display the date in both am pm format
List out different arguments in PHP header function?
List out different arguments in PHP header function?   List out different arguments in PHP header function