i am facing a problem
i have timestamp in string format -- Fri Jan 28 19:53:09 2005 now i
want to get the date from it. is it possible? pls. help. on using
strftime(%D,$timestamp) it is giving 01/01/70. May pls. help me.
Also pls. let me know whether calculation can be done in mysql on this
try
$date = date(Y-m-d,strtotime($timestamp));
Best thing to use if you want to do calcs on date/time data is to use the
unix time stamp...translates the timestamp into seconds since
01-01-1970...Much simpler to use in sql queries
Bastien
From: Balwant Singh [EMAIL PROTECTED]
Reply-To: [EMAIL
Can I embed a variable within a blob field, so that when the blob is printed
the variable is extracted and given its correct value?
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Balwant - according to
http://php.planetmirror.com/manual/en/ref.datetime.php shouldn't you be
using
http://php.planetmirror.com/manual/en/ref.datetime.phpfunction.strtotime.phpstrtotime
rather than strftime for this ? strftime needs input of a timestamp a large
Int32 Unix Timestamp), where