I have been trying to add a computed column to a view.
I want to add the "createdDateTime" field from the source and edit the time part of the field as 00:00:00.
I know the T-sql query that can be used to achieve it, but not having any luck trying to convert it to x++ code.
Tried many different variations of SysComputedColumn to achieve it, but no luck.
The T-sql query equivalent is
"DATEADD(HOUR, 0, CAST(CAST(T1.CREATEDDATETIME AS DATE) AS DATETIME)) AS CREATEDDATE1"
and this is the code that adds the value from the source to the computed column but i don't know how to set time as 00:00:00
"SysComputedColumn::returnField(viewName, identifierStr(MROWorkordertable), fieldstr(MROWorkOrderTable,CreatedDateTime))".
Any help would be appreciated.