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

Function date32_to_datetime

arrow-array/src/temporal_conversions.rs:55–57  ·  view source on GitHub ↗
(v: i32)

Source from the content-addressed store, hash-verified

53/// converts a `i32` representing a `date32` to [`NaiveDateTime`]
54#[inline]
55pub fn date32_to_datetime(v: i32) -> Option<NaiveDateTime> {
56 Some(DateTime::from_timestamp(v as i64 * SECONDS_IN_DAY, 0)?.naive_utc())
57}
58
59/// converts a `i64` representing a `date64` to [`NaiveDateTime`]
60#[inline]

Callers 4

parse_date32Function · 0.85
date32_to_dateFunction · 0.85
date_partMethod · 0.85
as_datetimeFunction · 0.85

Calls

no outgoing calls

Tested by 1

parse_date32Function · 0.68