sql - How to format entered date in mysql to timestamp format? -


how can format date timestamp in mysql?

i have query this:

select * orders  order_date between('2011-01-01 00:00:00') , ('2011-01-31 23:59:59'); 

in table have date timestamp, if run query above doesn't show result.

what want after inserting 2 dates in order_date date automatically converted timestamp this:

1334230309 

so if entered format 'yyyy-mm-dd hh:mm:ss', query should run , return orders between jan 01,2011 , jan 31,2011

ok solved issue sir eric. used unix_timestamp()


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -