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

Method value_as_datetime

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

Returns value as a chrono `NaiveDateTime`, handling time resolution If a data type cannot be converted to `NaiveDateTime`, a `None` is returned. A valid value is expected, thus the user should first check for validity. See notes on [`PrimitiveArray::value`] regarding nulls and panics

(&self, i: usize)

Source from the content-addressed store, hash-verified

1280 ///
1281 /// See notes on [`PrimitiveArray::value`] regarding nulls and panics
1282 pub fn value_as_datetime(&self, i: usize) -> Option<NaiveDateTime> {
1283 as_datetime::<T>(i64::from(self.value(i)))
1284 }
1285
1286 /// Returns value as a chrono `NaiveDateTime`, handling time resolution with the provided tz
1287 ///

Callers 1

value_as_dateMethod · 0.80

Calls 1

valueMethod · 0.45

Tested by

no test coverage detected