diff --git a/storage/connect/tabjson.cpp b/storage/connect/tabjson.cpp index 3c352dda7f0..d6fb6aff2eb 100644 --- a/storage/connect/tabjson.cpp +++ b/storage/connect/tabjson.cpp @@ -1171,7 +1171,8 @@ void JSONCOL::SetJsonValue(PGLOBAL g, PVAL vp, PJVAL val, int n) case TYPE_INTG: case TYPE_BINT: case TYPE_DBL: - vp->SetValue_pval(val->GetValue()); + case TYPE_DATE: + vp->SetValue_pval(val->GetValue()); break; case TYPE_BOOL: if (vp->IsTypeNum()) diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp index fec38217b0b..3c9dcb8412c 100644 --- a/storage/connect/value.cpp +++ b/storage/connect/value.cpp @@ -2707,7 +2707,11 @@ bool DTVAL::SetValue_pval(PVAL valp, bool chktype) ndv = ExtractDate(valp->GetCharValue(), Pdtp, DefYear, dval); MakeDate(NULL, dval, ndv); - } else + } else if (valp->GetType() == TYPE_BIGINT && + !(valp->GetBigintValue() % 1000)) { + // Assuming that this timestamp is in milliseconds + Tval = valp->GetBigintValue() / 1000; + } else Tval = valp->GetIntValue(); } else