Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
PeSeKa Honored Contributor.
Honored Contributor.
159 views

Sort by custom (string) date on report

Jump to solution

Hello,

I created a query for generate a report, with a custom (string) date, using local variables, to have the date in the following form: yyyy-mm-dd.

When I generate the report, I would to sort the data by date, but it's not work (because the date was converted in string).

There is a solution to sort the data or create a different custom date?

Thanks

1 Solution

Accepted Solutions
mrksr Super Contributor.
Super Contributor.

Re: Sort by custom (string) date on report

Jump to solution

… there is a local variable ConvertStringToDate that converts string ton date. Unfortunately this local variable is not available for queries, but for rules. So one solution might be this:

  1. set up a rule that fills an active list with all needed fields of events (and converts string to date by using local variables)
  2. run a query on the active list to create a report sorted by according time stamp

In step 1. you need to manipulate your time string to have the right format to be converted to variable of type date (this may be a little bit tricky…)

View solution in original post

2 Replies
mrksr Super Contributor.
Super Contributor.

Re: Sort by custom (string) date on report

Jump to solution

… there is a local variable ConvertStringToDate that converts string ton date. Unfortunately this local variable is not available for queries, but for rules. So one solution might be this:

  1. set up a rule that fills an active list with all needed fields of events (and converts string to date by using local variables)
  2. run a query on the active list to create a report sorted by according time stamp

In step 1. you need to manipulate your time string to have the right format to be converted to variable of type date (this may be a little bit tricky…)

View solution in original post

mschleich Acclaimed Contributor.
Acclaimed Contributor.

Re: Sort by custom (string) date on report

Jump to solution

Hi PeSeKa,

You could use the local variable GetDayOfYear or GetDayOfWeek in addition of your custom string date just to be used for sorting.

It is available in Query thus you should be able to do that. It is working as I am using it.

Thanks
regards

Michael

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.