Apache Drill - Date Time DATE_SUB(x,y)


The following program shows the query for this function −

Query

0: jdbc:drill:zk = local> select date_sub('2016-04-07',2) from (values(1));

Result

+————————————-+
|   EXPR$0    |
+————————————-+
| 2016-04-05  |
+————————————-+

The output indicates 2 days subtracted from the specified day.

apache_drill_sql_operations.htm
Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements