use DateTime $date = DateTime->now()->ymd(); [download]
In reply to Re: Date displaying the 0's by eXile in thread Date displaying the 0's by Anonymous Monk