Skip to main content

date_diff_units

Function date_diff_units 

Source
pub fn date_diff_units(ts1: i64, ts2: i64, unit: &str) -> Result<i64, String>
Expand description

Compute the difference ts2 - ts1 in the specified unit.

Units: "ms" (milliseconds), "s" (seconds), "min" (minutes), "h" (hours), "d" (days).