File: test_1613.test

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (26 lines) | stat: -rw-r--r-- 694 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# name: test/issues/general/test_1613.test
# description: Issue 1613: Millisecond format specifier in strftime, %g , doesn't work for most of the timestamp values and returns invalid UTF8
# group: [general]

statement ok
PRAGMA enable_verification

query I
select strftime(timestamp '2021-04-15 14:55:17.915', '%Y-%m-%d %H:%M:%S.%g')
----
2021-04-15 14:55:17.915

query I
select strftime(timestamp '2021-04-15 14:55:17.915', '%Y-%m-%d %H:%M:%S.%f')
----
2021-04-15 14:55:17.915000

query I
select strptime('2021-04-15 14:55:17.915', '%Y-%m-%d %H:%M:%S.%g')
----
2021-04-15 14:55:17.915

query I
select strptime('2021-04-15 14:55:17.915000', '%Y-%m-%d %H:%M:%S.%f')
----
2021-04-15 14:55:17.915