MCPcopy Create free account
hub / github.com/apache/arrow-rs / value_as_date

Method value_as_date

arrow-array/src/array/primitive_array.rs:1301–1303  ·  view source on GitHub ↗

Returns value as a chrono `NaiveDate` by using `Self::datetime()` If a data type cannot be converted to `NaiveDate`, a `None` is returned See notes on [`PrimitiveArray::value`] regarding nulls and panics

(&self, i: usize)

Source from the content-addressed store, hash-verified

1299 ///
1300 /// See notes on [`PrimitiveArray::value`] regarding nulls and panics
1301 pub fn value_as_date(&self, i: usize) -> Option<NaiveDate> {
1302 self.value_as_datetime(i).map(|datetime| datetime.date())
1303 }
1304
1305 /// Returns a value as a chrono `NaiveTime`
1306 ///

Callers

nothing calls this directly

Calls 2

value_as_datetimeMethod · 0.80
dateMethod · 0.80

Tested by

no test coverage detected