Time Stamp Null Verification
Posted: Tue Jan 11, 2005 12:14 pm
faced with 2 problems
1. have a field "record_date" in mysql as type "timestamp". the value saved is "20050111011408" . Now i want to format this date as the date of record creation.
is the line i am using to convert/ format/ interpret this value which comes out to be
"Monday 18th of January 2038 07:14:07 PM" where as it should be
"Monday 11th of January 2005...." what could be the problem.
2. the second part of the problem is that i want to check if there is any null value for this field, logically it should be
suggestions?
1. have a field "record_date" in mysql as type "timestamp". the value saved is "20050111011408" . Now i want to format this date as the date of record creation.
Code: Select all
print date("l dS of F Y h:i:s A",$rowї'record_date'])"Monday 18th of January 2038 07:14:07 PM" where as it should be
"Monday 11th of January 2005...." what could be the problem.
2. the second part of the problem is that i want to check if there is any null value for this field, logically it should be
Code: Select all
if(is_null($rowї'record_date']))
{print ("unknown");}
else {print ("known");}