The DT2Date function expects a DateTime value as input. The Depreciation Starting Date field is not a DateTime field, it is a Date field.
To see the definition of the field you are working with, you can either hover your mouse over it and it will show up in the tooltip, or you can put your cursor in the field and hit F12, which will open the source object
date := DT2DATE("FA Depreciation Book"."Depreciation Starting Date");
im trying to write above code to extract date from date and time variable i.e Depreciation Start Date
here date is a local variable of type Date and FA Depreciation Book is the table.
but im getting fallowing error
The DT2Date function expects a DateTime value as input. The Depreciation Starting Date field is not a DateTime field, it is a Date field.
To see the definition of the field you are working with, you can either hover your mouse over it and it will show up in the tooltip, or you can put your cursor in the field and hit F12, which will open the source object
Answers
im trying to write above code to extract date from date and time variable i.e Depreciation Start Date
here date is a local variable of type Date and FA Depreciation Book is the table.
but im getting fallowing error
Just use EVALUATE(). And only if this does not work, then you do text manipulation.
Sample code...
DTVar is a datetime variable
DateVar is a date variable
To see the definition of the field you are working with, you can either hover your mouse over it and it will show up in the tooltip, or you can put your cursor in the field and hit F12, which will open the source object
RIS Plus, LLC