[MonetDB-users] Does Monetdb supports Date functions?

Hi guys, Does Monetdb supports "datediff" function? I didn't found this function while I run "select name from functions". Besides, Does Monetdb supports other Date relevant functions? Any advices will be highly appreciated. Thanks in advance, Tony

Tony, That is correct. The functions found in the the 'functions' table is what we currently support. regards, Martin On 02/16/2012 07:50 AM, Dongli wrote:
Hi guys,
Does Monetdb supports “datediff” function? I didn’t found this function while I run “select name from functions”.
Besides, Does Monetdb supports other Date relevant functions?
Any advices will be highly appreciated.
Thanks in advance,
Tony
------------------------------------------------------------------------------ Virtualization& Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users

On 16-02-2012 11:49:20 +0100, Martin Kersten wrote:
Tony,
That is correct. The functions found in the the 'functions' table is what we currently support.
regards, Martin
On 02/16/2012 07:50 AM, Dongli wrote:
Hi guys,
Does Monetdb supports “datediff” function? I didn’t found this function while I run “select name from functions”.
What exactly do you need? Off the top of my head, you can do something like date '2012-02-16' - interval '2' day.

If you mean with datediff different number of dates between two dates then yes: select cast('2012-01-01' as date) - cast('2012-01-02' as date); +----------------------+ | sql_sub_single_value | +======================+ | -1 | +----------------------+ 1 tuple (1.111ms) sql>select cast('2012-01-01' as date) - cast('2012-02-02' as date); +----------------------+ | sql_sub_single_value | +======================+ | -32 | +----------------------+ 1 tuple (0.352ms) sql>select cast('2012-01-01' as timestamp) - cast('2012-01-02' as timestamp); +----------------------+ | sql_sub_single_value | +======================+ | -86400000 | +----------------------+ 1 tuple (0.820ms) (thats in ms, because that is the finest gradunalarity) Stefan
participants (4)
-
Dongli
-
Fabian Groffen
-
Martin Kersten
-
Stefan de Konink