Changeset: 43e813ff69fd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=43e813ff69fd
Modified Files:
        sql/scripts/13_date.sql
        sql/scripts/mtime.sql
Branch: DVframework
Log Message:

date_trunc in sql.


diffs (24 lines):

diff --git a/sql/scripts/13_date.sql b/sql/scripts/13_date.sql
--- a/sql/scripts/13_date.sql
+++ b/sql/scripts/13_date.sql
@@ -20,3 +20,8 @@ create function str_to_date(s string, fo
 
 create function date_to_str(d date, format string) returns string
        external name mtime."date_to_str";
+
+create function date_trunc( t timestamp, field string ) returns timestamp
+       external name mtime.timestamp_trunc;
+create function date_trunc_after_every( t timestamp, field string, after_every 
integer ) returns timestamp
+       external name mtime.timestamp_trunc_after_every;
diff --git a/sql/scripts/mtime.sql b/sql/scripts/mtime.sql
--- a/sql/scripts/mtime.sql
+++ b/sql/scripts/mtime.sql
@@ -114,3 +114,8 @@ create function dayofmonth( date ) retur
        external name mtime.dayofmonth;
 create function week( date ) returns integer
        external name mtime.weekofyear;
+
+create function date_trunc( field string, ts timestamp ) returns timestamp
+       external name mtime.timestamp_trunc;
+create function date_trunc_after_every( field string, after_every integer, ts 
timestamp ) returns timestamp
+       external name mtime.timestamp_trunc_after_every;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to