Cognos implements the ISO-SQL CAST function which can be used to convert several source to target data type combinations
CAST ( x, DATE ) where x is a timestamp will convert the value to a DATE, effectively removing any time value x held.
Keep in mind, some vendors SQL DDL may have the keyword DATE, but in reality their implementation is a timestamp (i.e. ORACLE).
As applicable, the expression will be generated in a SQL statement using the vendor's implementation of CAST or their equivalent.
------------------------------
NIGEL CAMPBELL
------------------------------
Original Message:
Sent: Fri January 22, 2021 04:12 PM
From: Towandra Grant
Subject: Framework Manager - How to convert datetime to date (sqlserver database)
What is the correct sql to use in Framework manager to convert a datetime query item to date only?
I tried using convert({date}, [Database View].[trans_action].[posting_date], 102) in the Calculation definition of the query item.
When validating and testing within the calculation definition, it works and returns a date (with no time) in the Test Results window.
However, when I try to validate it in the Query Subject Definition I get the following error:
XQE-PLN-0098 The vendor specific function "convert" is not supported.
What is the equivalent of the convert function that will work within Framework Manager?
------------------------------------
Cognos Analytics 11.1.6
Sql Server
Framework Manager
#CognosAnalyticswithWatson