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



Home Answers Viewqa Date-Calendar php date function

Have Programming Question? Ask it here!
 
 
 


sakthi
php date function
1 Answer(s)      5 years and 5 months ago
Posted in : Date-Calendar



Advertisement
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 />
Advertisements
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: http://www.roseindia.net/tutorial
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
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
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 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
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
php date format change
php date format change  How to change the date format in PHP
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
php error handling function
php error handling function  Is there any library or function that can be used to handle errors in PHP
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
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
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP
post function php
post function php  when should i use post function 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://www.roseindia.net/tutorial/php/phpbasics/PHP-Array-Merge-Recursive.html http
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 format validation
php date format validation  How to validate the date field in specific format in PHP
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
Current date in php
Current date in php  How to show the current date in the HTML page using PHP Script
current date in php
current date in php  PHP script to get current date.   Hi...;?=$today?> More tutorial on PHP date are available at: http://www.roseindia.net/tutorial/php/php-date-function.html and http://www.roseindia.net/tutorial/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
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
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
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 timezone function
php timezone function  how can i change the timezone using PHP
The PHP fileatime() function , fileatime php, fileatime in php
for fileatime() Function PHP <?php $time = time(); echo "current date... Example of fileatime() function in PHP Description Syntax for fileatime() Function PHP int fileatime ( file_name ) It returns Last Access time in int
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
Mysql Date now function
Mysql Date now function       Mysql Date now function is useful when you want to return the current... 'Mysql Date now function'. In this Tutorial we define a now ( ) Query
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 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
date_modify
date_modify() in PHP date_modify or DateTime::modify function modifies... , string $modify ) Parameters of Date Modify Function PHP object... by strtotime(). It returns the modify date time. Description public DateTime
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 PHP Description about PHP basename(): syntax for PHP basename()Function string basename ( string
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
PHP strtotime, PHP strtotime Function, strtotime Function, strtotime Function Example
PHP strtotime Function In this section we will learn strtotime with the help of example code. About strtotime function: The strtotime() is used to convert... the return value. Here is the examples of strtotime() function: <?php echo
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
The fgetcsv function example in PHP, fgetcsv php, fgetcsv in php
Examples of fgetcsv() function in php Description The PHP fgetcsv() function is used to parse the CVS file in PHP program. Here you will see how you... on failure and EOF. Code for PHP fgetcsv() Function in PHP <?php $file1
feof() Function in php
Examples of the feof() function in PHP Syntax on feof() function in PHP bool feof ( $file_pointer ) It is used for checking the end of file of ... and then the loop will terminate Code for feof() function in PHP <?php
 

 

 

DMCA.com