date format
fixed bug when no data is retrieved from mongo