[FX.php List] How to display a date in a different format

Andrew Denman adenman at tmea.org
Thu Jun 28 15:58:38 MDT 2007


http://us2.php.net/manual/en/function.date.php

string date ( string $format [, int $timestamp] )

Returns a string formatted according to the given format string using the
given integer timestamp or the current time if no timestamp is given. In
other words, timestamp is optional and defaults to the value of time().

timestamp
    The optional timestamp parameter is an integer Unix timestamp that
defaults to the current local time if a timestamp is not given. In other
words, it defaults to the value of time().

You might also need the use of this function for the timestamp:
http://us2.php.net/manual/en/function.strtotime.php

Andrew Denman

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Thursday, June 28, 2007 4:51 PM
To: FX.php Discussion List
Subject: [FX.php List] How to display a date in a different format

I know how to use the date() function to format today's date, but how  
do I use it to format the variable $d?

Thanks,

Bob


_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list