How can we filter a datetime field using todays date .I wrote some code ,no error is showing but not getting the output
RecChangeLog.SETfilter(RecChangeLog.“Date and Time”,format(TODAY));
Regards
Reshmi
How can we filter a datetime field using todays date .I wrote some code ,no error is showing but not getting the output
RecChangeLog.SETfilter(RecChangeLog.“Date and Time”,format(TODAY));
Regards
Reshmi
Value in Change Log Entry table Date and Time field is stored as “27-11-12 11:12:10.207”
but you are filtering with 27-11-12
Which is not going to work
what exactly is your requirement?
Dear Mohana,
But from the Change log Entry table when we filter the Datetime field using field filter ,it is working .so why it is not working through code.
I need to fetch todays change log with table no 37 to another table for getting the data to a report,since we were not keeping the change log for more than 45 days in Database.
Regards
Reshmi
When you enter 27-11-12…28-11-12 in field filter, it will be converted to 27-11-12 00:00…28-11-12 23:59…
If you want to filter on today then you can try
“Change Log Entry”.SETRANGE(“Date and Time”,CREATEDATETIME(TODAY,0T),CREATEDATETIME(TODAY,23.59T));
Dear Mohana,
It is working fine.Thanks for your valuable support and quick response.
Regards
Reshmi
Welcome.
Please dont forget to verify the posts which solved your problem.