You can translate the question and the replies:

Gettimeinmillis

Hi, I am trying to convert a timestamp field which is in the format (2021-08-25 12:53:29.13) to milli seconds by using the function gettimeinmillis(timestamp). Why is it not working? When I try it using dual for example : SELECT gettimeinmillis(now()) as time_in_millisecond FROM dual(); I get result and now() converts to millisecond However, when I apply this to my view : SELECT gettimeinmillis(field) as time_in_millisecond FROM my_view; It does not work! Any idea why is it not working? Thanks!
user
18-09-2021 21:13:01 -0400
code

5 Answers

Hi, Starting from Denodo Platform 7.0, Denodo allows users to extract milliseconds from the** timestamp values **by using the Datetime Function [GETTIMEINMILLIS](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/functions/datetime_functions/datetime_functions#gettimeinmillis). I was able to successfully extract milliseconds from the timestamp values in a view using GETTIMEINMILLIS as below: ` SELECT gettimeinmillis(field_1) as millisecond FROM view_1;` Hence, in your scenario, I would check the **‘vdp.log’ **file found under the “<DENODO_HOME>\logs\vdp” folder to find if there are any errors. Hope this helps!
Denodo Team
20-09-2021 08:22:03 -0400
code
This is the error I am getting " QUERY [JDBC ROUTE] [ERROR] Received exception with message ''DATEDIFF_BIG' is not a recognized built-in function name.' " The data source is sql server. Any idea how to troubleshoot this? Thanks!
user
20-09-2021 13:34:32 -0400
Hi The error 'DATEDIFFBIG’ is not a recognized built-in function name.’ may occur when using a wrong Database Adapter version to connect over a database. Hence, I would ensure that I use the database adapter version that matches the database version. For more information, you could refer to a similar Community question [When trying to use the concat function, I get an error saying that it is not a recognized built-in function name](https://community.denodo.com/answers/question/details?questionId=9060g0000000BD9AAM&title=When+trying+to+use+the+concat+function%2C+I+get+an+error+saying+that+it+is+not+a+recognized+built-in+function+name.) where they have talked about why the error occurs and how it could be resolved by changing the database adapter. Hope this helps!
Denodo Team
29-09-2021 07:11:38 -0400
code
Thank you so much, you are correct! It is indeed a adapter version issue, just tested with the correct version and it works fine, but it is stange and as a newer version adapter should still be compatible? Regards
user
29-09-2021 11:38:26 -0400
Hi I would be able to reproduce this error ‘DATEDIFFBIG’ is not a recognized built-in function name.’ using different adapter versions and found that the DATEDIFFBIG is delegated to the data source differently when using different database adapter versions. Hence, I would use the correct database adapter version. Hope this helps!
Denodo Team
06-10-2021 08:51:55 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here