When using this delegate to change the date format from YYYY-MM-DD to MM-DD-YYYY, it works for dates inputted and retrieved, however for certain fields that remains blank until a date is entered in the near future, 12/31/1969 is displayed instead of blank. How can this be fixed to show a blank and still show the correct date format of MM-DD-YYYY?
- Code: Select all
function delivery_date__display(&$record){
return date('m/d/Y', strtotime($record->strval('delivery_date')));
Thanks in advance.