Remove time from date and time string

HI guys,

I have a DB that gets updated with phone stats everyday and I would like remove the time from the below

02/07/2014 10:31:19

The value of this string will change from day to day but the format will not so it will always be date then time.

would there be any way to find the space and remove whats after it?

i would use

$yesterday = date("d/m/Y", strtotime("-1 days")); 

but that does not take in to account weekends when the stats are not ran.

Search PHP manual for strstr() or substr() former will truncate from the space latter starting from position 10.

Explode is quick, just explode by “space”.
If you are calling from the database,

SELECT DATE(ColumnName) FROM tablename

now problem solved.