Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , , ,

Sponsored Links



strftime() in PHP

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 21-11-2009
Member
 
Join Date: Nov 2009
Posts: 582
strftime() in PHP

Hi, I am new in PHP language. And want to know exact syntax of this function. So can anyone help me. Please tell me the syntax. I am waiting for your reply.
Reply With Quote
  #2  
Old 21-11-2009
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: strftime() in PHP

Hi, strftime() function is used to format a local time/date according to locale settings.

Syntax:
Code:
string strftime  ( string $format  [, int $timestamp = time()  ] )
Just change the syntax as you want. Just make use of your book to find out other details.

Last edited by Modifier : 21-11-2009 at 12:41 PM.
Reply With Quote
  #3  
Old 21-11-2009
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: strftime() in PHP

Hi, PHP uses strftime() function to formats a local time or date according to locale settings. It has following syntax:
Code:
strftime(format,timestamp)

No code has to be inserted here.

Last edited by Zecho : 21-11-2009 at 12:43 PM.
Reply With Quote
  #4  
Old 21-11-2009
Reegan's Avatar
Member
 
Join Date: Oct 2005
Posts: 2,299
Re: strftime() in PHP

Hi, strftime() function in PHP has following syntax.

Syntax:
Code:
string strftime  ( string $format  [, int $timestamp = time()  ] )
Example:
Code:
<?php
echo(strftime("%b %d %Y %X", mktime(20,0,0,11,2,99)).);
?>
The output of the code above could be:
Nov 2 1999 20:00:00
Nov 2 1999 19:00:00
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "strftime() in PHP"
Thread Thread Starter Forum Replies Last Post
How to use the strftime() in C++ Gavyn Software Development 5 02-03-2010 04:56 PM


All times are GMT +5.5. The time now is 03:49 AM.