How to filter date range on field CreatedDateTime in AX. ?
I’m trying to convert fromDt & toDate from TransDate to utdDateTime, and I insert fromDtConvert into range but I got Error (Like Pic 2).
Please advise, thank you
this’s my code.
October 19, 2017, 10:35am
Which line of code is causing that error?
When I fill date (from & to) and click OK, I got the debug view
What kind of code is actually for the createdDateTime column filter ? I’ve tried converting from TransDate to UtcDateTime but still error (I always get the debug view)
Please advice, thanks
The issue seems to be with setting the parameter but not with the filtering.
Check the data types you are using in data contract class (or) show us your methods in contract class (including class declaration).
I just wanna, How can i use filter TransDate (data type) on createddatetime field ?
does for filter createddatetime have to use utcdatetime data type ?
October 23, 2017, 11:21am
Not necessary. You can still use from and to as the date types and convert them to utcDateTime while applying the range.
You have done it right initially.
while currently, I use utcdatetme data type for parameter
yaa maybe, i will try it with this code
static void ConvertDate2DateTime(Args _args)
fromDate = mkDate(01,06,2017);
toDate = mkDate(30,06,2017);
fDateTime = Global::datetobeginUtcDateTime(fromDate,tz);
tDateTime = Global::datetoendUtcDateTime(toDate,tz);