From aadbd94fb11d33f645c759e3cda28ba5c79e86cb Mon Sep 17 00:00:00 2001 From: freemine Date: Thu, 22 Oct 2020 20:29:55 +0800 Subject: [PATCH] bugFix: fraction calc --- src/connector/odbc/src/todbc_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connector/odbc/src/todbc_conv.c b/src/connector/odbc/src/todbc_conv.c index c4e0ff653f..0b8b35bfd5 100644 --- a/src/connector/odbc/src/todbc_conv.c +++ b/src/connector/odbc/src/todbc_conv.c @@ -237,7 +237,7 @@ TSDB_CONV_CODE tsdb_timestamp_to_char(SQL_TIMESTAMP_STRUCT src, char *dst, size_ int n = snprintf(dst, dlen, "%04d-%02d-%02d %02d:%02d:%02d.%03d", src.year, src.month, src.day, src.hour, src.minute, src.second, - src.fraction % 1000000); + src.fraction / 1000000); if (n=19) return TSDB_CONV_TRUNC_FRACTION; -- GitLab