Test %f for data types without fractional seconds

This commit is contained in:
Alexander Gololobov 2022-12-21 19:57:30 +01:00
parent 5e7558b1a5
commit 2a3aa5248e
2 changed files with 13 additions and 0 deletions

View File

@ -36,3 +36,9 @@ no formatting pattern no formatting pattern
+0530
1234560
000340
2022-12-08 18:11:29.123400000
2022-12-08 18:11:29.1
2022-12-08 18:11:29.0
2022-12-08 18:11:29.0
2022-12-08 00:00:00.0
2022-12-08 00:00:00.0

View File

@ -57,3 +57,10 @@ SELECT formatDateTime(toDateTime('1970-01-01 00:00:00', 'Asia/Kolkata'), '%z');
select formatDateTime(toDateTime64('2010-01-04 12:34:56.123456', 7), '%f');
select formatDateTime(toDateTime64('2022-12-08 18:11:29.00034', 6, 'UTC'), '%f');
select formatDateTime(toDateTime64('2022-12-08 18:11:29.1234', 9, 'UTC'), '%F %T.%f');
select formatDateTime(toDateTime64('2022-12-08 18:11:29.1234', 1, 'UTC'), '%F %T.%f');
select formatDateTime(toDateTime64('2022-12-08 18:11:29.1234', 0, 'UTC'), '%F %T.%f');
select formatDateTime(toDateTime('2022-12-08 18:11:29', 'UTC'), '%F %T.%f');
select formatDateTime(toDate32('2022-12-08 18:11:29', 'UTC'), '%F %T.%f');
select formatDateTime(toDate('2022-12-08 18:11:29', 'UTC'), '%F %T.%f');