@@ -26,16 +26,21 @@ This example calculates the difference in hours between **yesterday** and **toda
26
26
``` sql
27
27
SELECT DATE_DIFF(HOUR, YESTERDAY(), TODAY());
28
28
29
- - [ RECORD 1 ]-- ---------------------------------
30
- DATE_DIFF(HOUR, yesterday(), today()): 24
29
+ ┌───────────────────────────────────────┐
30
+ │ DATE_DIFF(HOUR, yesterday(), today()) │
31
+ ├───────────────────────────────────────┤
32
+ │ 24 │
33
+ └───────────────────────────────────────┘
31
34
```
32
35
33
36
This example calculates the difference in years between the current date and January 1, 2000;
34
37
35
38
``` sql
36
39
SELECT NOW(), DATE_DIFF(YEAR, NOW(), TO_DATE(' 2000-01-01' ));
37
40
38
- - [ RECORD 1 ]-- ---------------------------------
39
- now(): 2024 - 10 - 15 03 :06 :37 .202434
40
- DATE_DIFF(YEAR, now(), to_date(' 2000-01-01' )): - 24
41
+ ┌────────────────────────────────────────────────────────────────────────────┐
42
+ │ now() │ DATE_DIFF(YEAR, now(), to_date(' 2000-01-01' )) │
43
+ ├────────────────────────────┼───────────────────────────────────────────────┤
44
+ │ 2024 - 10 - 15 03 :38 :23 .726599 │ - 24 │
45
+ └────────────────────────────────────────────────────────────────────────────┘
41
46
```
0 commit comments