Saturday, 15 June 2013

trunc date field in mysql like oracle -



trunc date field in mysql like oracle -

i not able utilize 'trunc(in oracle)' function in 'mysql' database. have table called dlb_cc_purchase , date field called due_date in 'mysql' database. info displaying in date field 20-11-2014 00:00:00 (20-nov-2014). in oracle using query

select * dlbcc_purchase trunc(due_date) = '20-nov-2014'

oracle db fetch row due date 20-11-2014 00:00:00. how can utilize function in 'mysql'? know basic question, trying long time truncate, str_to_date... not able fetch value. please help.

use date(expr) function. query example:

select * dlbcc_purchase date(due_date) = '2014-11-20'

mysql oracle date

No comments:

Post a Comment