Page 1 of 1

DATEFORMAT problem

Posted: Fri Mar 19, 2004 12:18 pm
by malcolmboston
hi guys

i came across a problem yesterday that much have arisen a while back
basically i hold the dates in a MySQL table using the format
2004-12-12 14:15:18
now i changed it using the dateformat feature however now i am unable to use my sort functions that i developed for it (sort by last logged in, sort by register date etc)

was wondering if theres anyway around this as i cannot see the reason why it is doing this as it is still stored in MySQL as the original format

any ideas?

Posted: Fri Mar 19, 2004 12:20 pm
by andre_c
how did you change it?

Posted: Fri Mar 19, 2004 12:23 pm
by malcolmboston
im not at my machine atm but something like

Code: Select all

$query = "SELECT *, DATE_FORMAT(last_login, '%H:%i - %d/%m/%y ') AS last_login FROM members ORDER BY access_level ASC" or die(mysql_error());
should work

hope that helps

anyone got any idea on my problem?

Posted: Sat Mar 20, 2004 6:39 am
by malcolmboston
no1 ever experienced this? :(