output formatted date in form