Inflectra Customer Forums: Date Compare in ESQL Query (Thread) Im trying to do a date comparison in my custom query so that I can create a report that always reports on the last 30 days of test runs. Unfortunately it appears that every method suggested in the IBM documentation does not work in the custom query. Ive tried: Using DATEDIFF(date1, date2, days). Simply doing an interval subtraction (CurrentDateTime() - TR.END_TIME) DAY en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spirateam/reports/1829.aspxthreadId=1829Tyler Nielsen (tnielsen@billtrust.com)CustomReportsESQLDate Compare in ESQL Query Im trying to do a date comparison in my custom query so that I can create a report that always reports on the last 30 days of test runs. Unfortunately it appears that every method suggested in the IBM documentation does not work in the custom query. Ive tried: Using DATEDIFF(date1, date2, days). Simply doing an interval subtraction (CurrentDateTime() - TR.END_TIME) DAY Mon, 09 Apr 2018 15:50:41 -04002018-08-17T06:30:08-04:00/Support/Forum/spirateam/reports/1829.aspxmessageId=3257Jim R (donotreply5@kronodesk.net) Hi There are two types of entity SQL, one by IBM which is not used by Spira, and the other which i Hi There are two types of entity SQL, one by IBM which is not used by Spira, and the other which is from Microsoft, which is the technology being used. So you need to refer to the Microsoft documentation instead: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/ef/language-reference/entity-sql-reference Regards Jim Mon, 09 Apr 2018 16:53:11 -04002018-04-09T16:53:11-04:00/Support/Forum/spirateam/reports/1829.aspx#reply3257messageId=3258Tyler Nielsen (tnielsen@billtrust.com) Well, that certainly helps to know : ) Ok, for any future readers, I was able to solve my issue Well, that certainly helps to know : ) Ok, for any future readers, I was able to solve my issue with the expression: WHERE DiffDays(TR.END_DATE, CurrentDateTime()) < 30 Thanks! Mon, 09 Apr 2018 17:23:08 -04002018-04-09T17:23:08-04:00/Support/Forum/spirateam/reports/1829.aspx#reply3258messageId=3376Tung Nguyen (tran.nguyen@transport.nsw.gov.au) Hi, To extend this, Id like to report the list of test executed with the results, however only the Hi, To extend this, Id like to report the list of test executed with the results, however only the last result which that test case was tested multiple times. How can we get that from Entity SQL? many thanks Fri, 17 Aug 2018 06:30:08 -04002018-08-17T06:30:08-04:00/Support/Forum/spirateam/reports/1829.aspx#reply3376