LO 7.2 Calc, date time functions - Difference between FR & English version - how to get the decimal difference of two dates?

Hi,
In LO 7.2 Calc,
suppose I have in A1 an end date time and A2 a start date time
for instance:
A1 =2022-01-02 11:00
A2 =2021-12-20 12:00

In B1, I wish to have the date time differences in decimal of the (end - start) dates.
datediff(A2;A1;“d”) returns the date difference as an INTEGER in days but this is not what I want.

In the English Help, I do not see an option for hours, minutes or seconds:
https://help.libreoffice.org/latest/en-US/text/scalc/01/func_datedif.html?DbPAR=CALC#bm_id3155511

However, surprisingly I do see an option in the FRENCH version
https://help.libreoffice.org/latest/fr/text/sbasic/shared/03030120.html?DbPAR=BASIC#bm_id6134830

My LO version indicated in about is:
Version: 7.2.4.1 / LibreOffice Community
Build ID: 20(Build:1)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: fr-BE (fr_BE.utf8); UI: fr-FR
7.2.4-1
Calc: threaded

So I tried in B1
datediff(“h”;A1;A2)
or
datediff(A1;A2; “h”)
or with “m” or with “s”, but none functions.

Questions:

  • Is there a difference of implantation between an LO English and LO French version?
    I thought it was “merely” an question of translation.

  • More precisely, are they different datediff implementation according to LO builds?

  • How to get a date time difference across versions?

There are two different worlds - the Calc world and the Basic world. These worlds may contain functions with the same names (“namesakes”), but these are still different functions.
Just use

=A1-A2

and format the cell as time.

2 Likes

DATEDIFF don’t work with time intervals lesser than day.

… in case you want explizit decimal_hours:
=(A1-A2)*24 but formatted as Standard