Skip to main content

datedif

Function datedif 

Source
pub fn datedif<A: DateTime, B: DateTime>(
    start_date: A,
    end_date: B,
    format: DateDifMethod,
) -> FnNumber3<A, B, DateDifMethod>
Expand description

Returns the difference in years, months, or days of two date numbers.

documentfoundation->DATEDIF

Syntax:

    DATEDIF( StartDate: DateParam; EndDate: DateParam; Format: Text )

Constraints: None

Semantics: Compute difference of StartDate and EndDate, in the units given by Format.

The Format is a code from the following table, entered as text, that specifies the format you want the result of DATEDIF to have.

See also: crate::of::days360(), crate::of::days(), [crate::of::infix operator “-”()],