在DolphinDB database中,有共享表定义如下:
t=table(1..3 as id,(now() - 2)..now() as ts)
share(t, `sharedT);
我在DolphinDB C++ API中查询ts列的值,代码如下:
DBConnection conn;
TableSP table = conn.run("select * from sharedT");
ConstantSP col1=table->getcolumn(1);
cout<<col1->getString(0)<<endl;
执行后,显示的结果类似于2020.02.20T01:44:58,但我要获取的格式为02/20 / 2020T01:44:58。请问该如何转换?
可以在查询时用format或datetimeFormat转换: