1

I write the following scripts, but the timestamp is wrong:

t=table(10:0, `sym`datetime, [SYMBOL,DATETIME]);
insert into t values("abc",now())
t

sym datetime

abc 1992.07.14T09:35:43

print select now()

([2021.08.09T10:11:24.080])

The shown time is 1921 when I invoke the function “now()” in the insert into clause. But the shown time is 2021 when I call the function “now()” individually. What’s the reason?

1 Answers1

0

Because the type of datetime column is DATETIME, but the type of the inserted data(now()) is TIMESTAMP. The inconsistent types cause this problem. Please unify the type of them.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
dontyousee
  • 458
  • 2
  • 9