Date Error in Test Values for Aggregate due to #

Date Error in Test Values for Aggregate due to #

  

I enter a valid date into my Test Values on the aggregate, but OutSystems wraps anything I enter in the date variable with # and then I get an error like this:

How do I get this to work? If I take the #'s off, it puts them back. If I use CurrDate(), it becomes this and breaks again:

Please help, and thank you!

Solution

Hi PJ M

This is not a valid literal date in OutSystems.

The format is #yyyy-mm-dd# ex: #2018-01-17#

And as for the CurrDate() function, it does not need the # around it, while I'm not sure you can use CurrDate() as test value in Aggregate (never used, never tested it).

Cheers.


Solution

That works, thank you!  It's strange that OutSystems displays dates to me in MM/DD/YYYY but I can't use that format to get my filter to work. 

So weird. I submitted an IDEA to make this consistent and thus more intuitive:

https://www.outsystems.com/ideas/4985/allow-date-entry-into-test-values-in-same-format-as-results-are-displayed



Hi PJ M

The format I show is the format as the date is stored internally. Literals, in code, must use this format.
Allowing a single way of using literals in the code reduces the possibility of errors.

But the format as date is shown is configurable in Service Center.

Cheers.