implement out_format for datetime