pub enum DateTimeField {
Show 44 variants
Year,
Years,
Month,
Months,
Week(Option<Ident>),
Weeks,
Day,
DayOfWeek,
DayOfYear,
Days,
Date,
Datetime,
Hour,
Hours,
Minute,
Minutes,
Second,
Seconds,
Century,
Decade,
Dow,
Doy,
Epoch,
Isodow,
Isoyear,
IsoWeek,
Julian,
Microsecond,
Microseconds,
Millenium,
Millennium,
Millisecond,
Milliseconds,
Nanosecond,
Nanoseconds,
Quarter,
Time,
Timezone,
TimezoneAbbr,
TimezoneHour,
TimezoneMinute,
TimezoneRegion,
NoDateTime,
Custom(Ident),
}Expand description
Represents the date/time fields used by functions like EXTRACT.
Each variant corresponds to a supported date/time part (for example
YEAR, MONTH, DAY, etc.). The Custom variant allows arbitrary
identifiers (e.g. dialect-specific abbreviations).
Variants§
Year
YEAR
Years
YEARS (plural form)
Month
MONTH
Months
MONTHS (plural form)
Week(Option<Ident>)
WEEK, optionally followed by a weekday, e.g. WEEK(MONDAY).
Weeks
WEEKS (plural form)
Day
DAY
DayOfWeek
DAYOFWEEK
DayOfYear
DAYOFYEAR
Days
DAYS (plural form)
Date
DATE
Datetime
DATETIME
Hour
HOUR
Hours
HOURS (plural form)
Minute
MINUTE
Minutes
MINUTES (plural form)
Second
SECOND
Seconds
SECONDS (plural form)
Century
CENTURY
Decade
DECADE
Dow
DOW (day of week short form)
Doy
DOY (day of year short form)
Epoch
EPOCH
Isodow
ISODOW
Isoyear
ISOYEAR
IsoWeek
ISOWEEK
Julian
JULIAN
Microsecond
MICROSECOND
Microseconds
MICROSECONDS (plural form)
Millenium
MILLENIUM (alternate spelling)
Millennium
MILLENNIUM (alternate spelling)
Millisecond
MILLISECOND
Milliseconds
MILLISECONDS (plural form)
Nanosecond
NANOSECOND
Nanoseconds
NANOSECONDS (plural form)
Quarter
QUARTER
Time
TIME
Timezone
TIMEZONE
TimezoneAbbr
TIMEZONE_ABBR
TimezoneHour
TIMEZONE_HOUR
TimezoneMinute
TIMEZONE_MINUTE
TimezoneRegion
TIMEZONE_REGION
NoDateTime
NODATETIME indicates no date/time part
Custom(Ident)
Trait Implementations§
Source§impl Clone for DateTimeField
impl Clone for DateTimeField
Source§fn clone(&self) -> DateTimeField
fn clone(&self) -> DateTimeField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DateTimeField
impl Debug for DateTimeField
Source§impl Display for DateTimeField
impl Display for DateTimeField
Source§impl Hash for DateTimeField
impl Hash for DateTimeField
Source§impl Ord for DateTimeField
impl Ord for DateTimeField
Source§fn cmp(&self, other: &DateTimeField) -> Ordering
fn cmp(&self, other: &DateTimeField) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DateTimeField
impl PartialEq for DateTimeField
Source§impl PartialOrd for DateTimeField
impl PartialOrd for DateTimeField
Source§impl Visit for DateTimeField
impl Visit for DateTimeField
Source§impl VisitMut for DateTimeField
impl VisitMut for DateTimeField
Source§fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
VisitorMut. Read more