如果您已经导入数据了,用temporalParse 可以把字符串转换成DolphinDB中的时序类型数据。
temporalParse( "093000000", "HHmmssSSS")
另外,针对导入csv的场景,loadText函数提供了schema参数用来指定指定数据文件中日期或时间的格式,这样load进来的日期列格式直接是09:30:00.000。
示例如下
schema = extractTextSchema("yourFilePath"); update schema set type="TIME" where name = "yourTimeColumnName" //修改指定列字段类型 update schema set format="" // 对变量schema增加format列 update schema set format="HHmmssSSS" where name = "yourTimeColumnName" // 修改指定列数据格式 loadText("yourFilePath",,schema)