Hi ALL,
What I want to do is the same as Starting Date Filter in Form 7002. But the data type of my record is DateTime and the input filter is Date (like the Starting Date Filter textbox in Form 7002).
I used SETFILTER("Created DateTime", DateFilter), but nothing will be returned.
Can anyone give me some opinions?
0
Comments
- You can't filter a datetime field with a date field.
- If you want to get the "date filter" field value you must use GETFILTER
If "DateFilter" is a variable, use this If you mean the field "Date Filter", then use thisYou first have to create a datetime value out of your date value.
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
SETFILTER("Created DateTime",CREATEDATETIME(DateFilter,0T));
This creates a datetime from your date and the unspecified time 0T.
To extract the date part from a datetime use
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]