VirtueMart Mysql Sql date()

/*2011-04-19 16:13:36*/
SELECT now() as ahora

/*2011-04-19*/
SELECT date(now()) as ahora

/*Ordenes*/
SELECT order_id, cdate, date(from_unixtime(cdate)) FROM jos_vm_orders

/*Ordenes de hoy*/
SELECT order_id, cdate, date(from_unixtime(cdate)), date(now())
FROM jos_vm_orders
WHERE date(from_unixtime(cdate)) = date(now())


Fuente:
http://www.damianculotta.com.ar/2008/10/24/convirtiendo-de-timestamp-a-date-desde-mysql/

, ,

post-author