flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

format date (custom format)

Open a-salimkhanov opened this issue 3 years ago • 0 comments

Format datetime with custom format, like:

model = api.model('Todo',
    {
        'id': fields.Integer(readonly = True),
        'name': fields.String('Buy milk'),
        'created_at': fields.DateTime(dt_custom_format = '%Y-%m-%dT%T.%fZ', readonly = True)
    }
)

a-salimkhanov avatar Jan 15 '22 19:01 a-salimkhanov