Click to See Complete Forum and Search --> : using the date function


k0r54
05-18-2005, 12:44 PM
Hi,

I am putting a value into a field in a db by using NOW(), i am using mysql result and it is all working, the problem is that the field is as a datetime so it comes out in this format. yyyy-mm-dd hh:mm:ss, before i changed the field to a datetime i used varchar and set the date prior to entry as this

date("l jS F Y \a\\t g:i A");

Thats works fine, the problem is how when i do this

$LastLogin("l jS F Y \a\\t g:i A");

$LastLogin being the value of the field it doesn;t work :(.

Any ideas
Thanks
Adam

k0r54
05-18-2005, 02:47 PM
Many thanks but i have done it


date("l jS F Y \a\\t g:i A", strtotime($LastLogin))


works nicely

Thanks anyway