In the following example the field name is a string and date is of type datetime.
A query, SELECT name, date FROM sometable returns a result set. This is placed in $result and accessed via $info=mysql_fetch_array($result).
A while loop takes each field in turn and places them in local variables $name and $date respectively.
The $date seems to be giving me a timestamp of just the year (ie e.g. 2002-01-11 00:00:00 gives the timestamp 2002) which, when used via the date() function, always gives Jan 1, 1970 1.33am.
A straight output of $date shows the correct full date and time but I want to format the output.
Any ideas how to get the full timestamp?
Much obliged
splui
Timestamps
Moderator: General Moderators