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

Announcements

No record found.

News and Announcements icon
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 622
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?
 
  • Adis Profile Picture
    6,904 Super User 2026 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
    240,852 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
    622 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 523 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 408 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 354

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans