On Tuesday 12 March 2002 19:43, Balaji Ankem wrote:
> Hi friend,
>       I never ued strftime function. I am confusing with the syntax.
>       My problem is like this:
>       I have the DATETIME in the variable $row->fromdate as YYYY-MM-DD
>       Is it possible to convert it to DD/MM/YYYY HH:MM AM or PM using
> strftime() function?
>       //Is below code is correct
>       $time=strftime([%a%b%C%d%I%p],$row->fromdate);
>       echo '$time';

strftime() requires a unix-timestamp as an input.

In your db query do:

 SELECT UNIX_TIMESTAMP(fromdate) AS from_date FROM table;


 $time=strftime("some format", $row->from_date);

Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

If you are honest because honesty is the best policy, your honesty is corrupt.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to