Skip to content

Commit

Permalink
Postfix for #6987 - DATEDIFF does not support fractional value for MI…
Browse files Browse the repository at this point in the history
…LLISECOND.
  • Loading branch information
asfernandes committed Sep 30, 2021
1 parent eafbb05 commit f384412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jrd/SysFunction.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit f384412

Please sign in to comment.