8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 06:03:02 +01:00

Postfix for #6987 - DATEDIFF does not support fractional value for MILLISECOND.

This commit is contained in:
Adriano dos Santos Fernandes 2021-09-30 10:10:38 -03:00
parent eafbb05fa4
commit f384412ae2

View File

@ -3985,7 +3985,7 @@ dsc* evlDateDiff(thread_db* tdbb, const SysFunction* function, const NestValueAr
case blr_extract_millisecond:
result = (SINT64) ONE_DAY *
(timestamp2.value().timestamp_date - timestamp1.value().timestamp_date) * 1000;
(timestamp2.value().timestamp_date - timestamp1.value().timestamp_date) * ISC_TIME_SECONDS_PRECISION;
result += (SINT64) timestamp2.value().timestamp_time - (SINT64) timestamp1.value().timestamp_time;
scale = ISC_TIME_SECONDS_PRECISION_SCALE + 3;
break;