Hii Master,
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.
Pic 2
When I fill date (from & to) and click OK, I got the debug view
Like this,
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
I just wanna, How can i use filter TransDate (data type) on createddatetime field ?
does for filter createddatetime have to use utcdatetime data type ?
Pranyoto said:does for filter createddatetime have to use utcdatetime data type ?
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)
{
TransDate fromDate,toDate;
TimeZone tz;
UtcDateTime fDateTime,tDateTime;
;
fromDate = mkDate(01,06,2017);
toDate = mkDate(30,06,2017);
fDateTime = Global::datetobeginUtcDateTime(fromDate,tz);
tDateTime = Global::datetoendUtcDateTime(toDate,tz);
print fDateTime;
print tDateTime;
pause;
}
Ref: