1

Sybase文档显示了如何转换为多种日期/时间格式,但没有显示 bigdatetime 支持的微秒。我可以使用什么 CONVERT 样式?

例如:

SELECT CURRENT_BIGDATETIME() 
-------------------
May  8 2019  4:30PM
                 ^^^ I want microseconds here
4

1 回答 1

1

我找到了几种我找不到文档的样式,但它们对我有用,例如,

SELECT CONVERT(CHAR(50),CURRENT_BIGDATETIME(),138)
May  8 2019  4:47:55.706489PM

以下是我找到的样式及其输出的样子:

Style   Output
36      4:34:28.070375PM
37      16:34:28.073989
38      May  8 19  4:34:28.077720PM
39      May  8 19 16:34:28.081418
40      19-05-08 16:35:41.892544
136     4:37:10.291454PM
137     16:37:10.295289
138     May  8 2019  4:37:10.299460PM
139     May  8 2019 16:37:10.304023
140     2019-05-08 16:37:10.308430
141     May  8 2019  4:37:10.312575PM

(这是在 Adaptive Server Enterprise/15.7 上...)

于 2019-05-08T20:49:00.080 回答