fix in formatdate when no date is passed