Hello
I am trying this query:
SELECT ARTICLE_NO,
USERNAME,
ACCESSSTARTS,
ARTICLE_NAME,
date_format( ACCESSSTARTS, '%d %m %Y' ) AS shortDate
FROM AUCTIONS
WHERE upper( ARTICLE_NAME ) LIKE '%hardy%'
LIMIT 0 , 10;
Which works fine, but shortDate is null, and I am unsure why.
The contents of the database is like so:
ARTICLE_NO USERNAME ACCESSSTARTS ARTICLE_NAME shortDate
110313660559 banger-wear 17.11.2008 13:24:56 acolshirt NULL
edit: The accessstarts field is not a datetime field but a varchar. I am unsure of what to do. Should I simply strip everything after the first space in ACCESSSTARTS to display only the date?
Or would it be better to convert the column to a datetime field, and if so, how would I specify that it should be in %D.%M.%Y format instead of the default, which apprantly starts with %Y