Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master 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
Anil_Babu_Samineni

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";

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

It's clearly stating ..

I believe you need Convert() instead to_timestamp

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
amit_saini
Master III
Master III
Author

Sorry Anil,

Can u please help with an example.

My SQL date format is below:

Thanks,

AS

Anil_Babu_Samineni

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";

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful