Edit page in Livemark
(2024-11-07 15:17)

Datetime Field

Overview

A date with a time (by default in ISO8601 format). Read more in Table Schema Standard.

Example

from frictionless import Schema, extract, fields

data = [['name'], ['2022-08-22T12:00:00']]
rows = extract(data, schema=Schema(fields=[fields.DatetimeField(name='name')]))
print(rows)
{'memory': [{'name': datetime.datetime(2022, 8, 22, 12, 0)}]}

Reference

fields.DatetimeField (class)

fields.DatetimeField (class)

Field representation

Signature

(*, name: str, title: Optional[str] = None, description: Optional[str] = None, format: str = default, missing_values: List[str] = NOTHING, constraints: Dict[str, Any] = NOTHING, rdf_type: Optional[str] = None, example: Optional[str] = None, schema: Optional[Schema] = None) -> None

Parameters

  • name (str)
  • title (Optional[str])
  • description (Optional[str])
  • format (str)
  • missing_values (List[str])
  • constraints (Dict[str, Any])
  • rdf_type (Optional[str])
  • example (Optional[str])
  • schema (Optional[Schema])