Ecto.DateTime

An Ecto type that includes a date and a time.

Source

Summary

cast(dt)

Casts to date time

dump(arg1)

Converts an Ecto.DateTime into a {date, time} tuple

from_date(date)

Converts the given Ecto.Date into Ecto.DateTime

from_date_and_time(date, time)

Converts the given Ecto.Date and Ecto.Time into Ecto.DateTime

from_erl(arg)

Returns an Ecto.DateTime from an Erlang datetime tuple

load(datetime)

Converts a {date, time} tuple into an Ecto.DateTime

local()

Returns an Ecto.DateTime in local time

to_date(date_time)

Converts Ecto.DateTime into an Ecto.Date

to_erl(date_time)

Returns an Erlang datetime tuple from an Ecto.DateTime

to_iso8601(date_time)

Converts Ecto.DateTime to its ISO 8601 UTC representation

to_string(date_time)

Converts Ecto.DateTime to its string representation

to_time(date_time)

Converts Ecto.DateTime into an Ecto.Time

type()

The Ecto primitive type

utc()

Returns an Ecto.DateTime in UTC

Functions

cast(dt)

Casts to date time.

Source
dump(arg1)

Converts an Ecto.DateTime into a {date, time} tuple.

Source
from_date(date)

Converts the given Ecto.Date into Ecto.DateTime.

The time component is zero.

Source
from_date_and_time(date, time)

Converts the given Ecto.Date and Ecto.Time into Ecto.DateTime.

Source
from_erl(arg)

Returns an Ecto.DateTime from an Erlang datetime tuple.

Source
load(datetime)

Converts a {date, time} tuple into an Ecto.DateTime.

Source
local()

Returns an Ecto.DateTime in local time.

Source
to_date(date_time)

Converts Ecto.DateTime into an Ecto.Date.

Source
to_erl(date_time)

Returns an Erlang datetime tuple from an Ecto.DateTime.

Source
to_iso8601(date_time)

Converts Ecto.DateTime to its ISO 8601 UTC representation.

Source
to_string(date_time)

Converts Ecto.DateTime to its string representation.

Source
to_time(date_time)

Converts Ecto.DateTime into an Ecto.Time.

Source
type()

The Ecto primitive type.

Source
utc()

Returns an Ecto.DateTime in UTC.

Source