web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Clean up DataBaseLog

(1) ShareShare
ReportReport
Posted on by 616
Hi,
I like to use the standard functionallity to clean up the database log:
 
 
 
A dialog opend where particular filters can be set:
 
Hopeful to delete all database log entries from today less than 30 days I create this filter (see  Advanced filtering and query syntax - Finance & Operations | Dynamics 365 | Microsoft Learn) But it doesn't work...
 
What is the right syntax to define a query, that deletes all entries from today less 30 days?
 
I have the same question (0)
  • Adis Profile Picture
    6,027 Super User 2025 Season 2 on at
    Hello,
     
    I tried different things and it didnt work. Its weird that it worked for others:
     
     
    When I filtererd like you mentioned, the system deleted all records.
     
     
     
     
    I tried the following:
     
     
     
    Checked the parameters on the batch job and received this. Which means, it did nothing, because the filter means: until empty date and empty date is 01.01.1900. So nothing was deleted.
     
     
    Entering a specific date like : ..20.02.2025 works fine. However, I need a relative date for setting up a batch job.
     
     
    I flagged the question for help.
     
    @André Arnaud de Calavon do you have any idea?
     
     
     
    Kind regards, Adis
     
     
     
  • Martin Dráb Profile Picture
    237,697 Most Valuable Professional on at
    What exactly do you mean by "it doesn't work"?
     
    You seem to want a query returning records created 30 days ago or earlies, but that's not what your filter does. You want to remove 30 days from today, not to add them: (lessThanUtcDate(-30)).
  • Christian Busche Profile Picture
    616 on at
    Hey Martin,
    I wanted to delete data that is older than today minus 30 days. Example... On 01.03. all data that was created before 30.01. is to be deleted. I only wanted to keep the data from the last 30 days...
     
    That was not possible with my filter. So I try to use "your" filter lessThanUtcDate(-30)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans