Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
amit_saini
Honored Contributor III

ErrorMsg: 'to_timestamp' is not a recognized built-in function name

Hi Folks,

Can you please suggest , why I'm getting below error:

ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: 'to_timestamp' is not a recognized built-in function name.

SQL SELECT *

FROM MasterCAQ.dbo."CAQ_Leer"

WHERE DTTSERF > to_timestamp('12/19/2017 05:04:51', 'MM/DD/YYYY hh:mm:ss')

Thanks,

AS

1 Solution

Accepted Solutions

Re: ErrorMsg: 'to_timestamp' is not a recognized built-in function name

As always, I would prefer to work QV functions. Because, If SQL getting down that created headache again. Any way, using Qlikview you may try this?

Load Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') as DTTSERF where Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') > '12/19/2017 05:04:51';

SQL SELECT * FROM MasterCAQ.dbo."CAQ_Leer";

Even, more efficient you can use

SET Var = 12/19/2017 05:04:51;


And, Then use this?

Load * Where DTTSERF > '$(Var)';

Load Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') as DTTSERF;

SQL SELECT * FROM MasterCAQ.dbo."CAQ_Leer";

Life is so rich, and we need to respect to the life !!!
3 Replies

Re: ErrorMsg: 'to_timestamp' is not a recognized built-in function name

It's clearly stating ..

I believe you need Convert() instead to_timestamp

Life is so rich, and we need to respect to the life !!!
amit_saini
Honored Contributor III

Re: ErrorMsg: 'to_timestamp' is not a recognized built-in function name

Sorry Anil,

Can u please help with an example.

My SQL date format is below:

Thanks,

AS

Re: ErrorMsg: 'to_timestamp' is not a recognized built-in function name

As always, I would prefer to work QV functions. Because, If SQL getting down that created headache again. Any way, using Qlikview you may try this?

Load Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') as DTTSERF where Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') > '12/19/2017 05:04:51';

SQL SELECT * FROM MasterCAQ.dbo."CAQ_Leer";

Even, more efficient you can use

SET Var = 12/19/2017 05:04:51;


And, Then use this?

Load * Where DTTSERF > '$(Var)';

Load Date(Date#(DTTSERF, 'MM/DD/YYYY hh:mm:ss TT'), 'MM/DD/YYYY hh:mm:ss') as DTTSERF;

SQL SELECT * FROM MasterCAQ.dbo."CAQ_Leer";

Life is so rich, and we need to respect to the life !!!
Community Browser