Date Compare in ESQL Query

Monday, April 9, 2018 3:50:41 PM

I'm 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.

I've tried:

  • Using DATEDIFF(date1, date2, "days").
  • Simply doing an interval subtraction (CurrentDateTime() - TR.END_TIME) DAY
3 Replies
Monday, April 9, 2018 4:53:11 PM
Avatar
re: tnielsen on Monday, April 9, 2018 3:50:41 PM

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

Monday, April 9, 2018 5:23:08 PM
Avatar
re: inflectra.jimx on Monday, April 9, 2018

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!

Friday, August 17, 2018 6:30:08 AM
Avatar
re: tnielsen on Monday, April 9, 2018

Hi,

To extend this, I'd 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

Statistics
  • Started: Monday, April 9, 2018 3:50:41 PM
  • Last Reply: Friday, August 17, 2018 6:30:08 AM
  • Replies: 3
  • Views: 846