How can I do this using the DB class :
SELECT DATE_FORMAT(timestampfield, '%Y-%m-%d %H:%i:%s') AS dtime FROM
table
i was thinking something along these lines : DB::select('id',array(DATE_FORMAT('timestamp', '%Y-%m-%d'),'timestamp'))
the idea is to return a formatted date as opposed to the MYSQL timestamp ( Y-M-D h:m:s)
perhaps if possible, you can suggest a better way to deal with formatting MySQL timestamp
thank you for your help
DB::expr() wraps the string in a Database_Expression object that prevents it from being quoted. It's put into an array with 'dtime' as the second value that will make 'dtime' the alias for the column.