HI, I am getting the date from mysql as "2007-07-04 18:00:55" in this format. While displaying I want to show as "04/07/2007". How can I format like that?
when you get it from mysql, in your query, let mysql do the dirty work. select date_format(my_date,'%m/%d/%Y') as date from tbl1 Code (markup):
use the unix_timestamp function in mysql, it's better IMO Then in php strftime("time format",unix_timestamp) PHP: