xia_fields.fields.DateTimeField

class xia_fields.fields.DateTimeField(dt_format: str = '%Y-%m-%dT%H:%M:%S.%f', **kwargs)

Bases: BaseField

__init__(dt_format: str = '%Y-%m-%dT%H:%M:%S.%f', **kwargs)
Parameters

no_display (object) –

Methods

__init__([dt_format])

param no_display

get_value(value)

Get detailed value of a field

load_value(value)

Get value of a field in the Document

to_db(value[, lazy])

Transform the data into a database compatible format

to_display(value[, lazy])

Transform the data into display format

validate(value)

Validate data

get_value(value)

Get detailed value of a field

Examples

In the case of a reference, the get value will fetch the data of a reference

load_value(value)

Get value of a field in the Document

Examples

In the case of a reference, the load value don’t fetch the data and just return the reference id

to_db(value, lazy: bool = True)

Transform the data into a database compatible format

to_display(value, lazy: bool = True)

Transform the data into display format

validate(value)

Validate data