new fmtdate function