web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    5,823 Super User 2025 Season 2 on at
    Clean up DataBaseLog
    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
    236,960 Most Valuable Professional on at
    Clean up DataBaseLog
    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
    Clean up DataBaseLog
    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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 580 Most Valuable Professional

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 554

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans