Highlighted
Honored Contributor.
Honored Contributor.
89 views

tql now() function

Hello, I would like to be able to specify the current time to compare specific date fields in a tql query. 

Does someone know if something similar to a now() function is available in uCMDB.

Thanks,

Benoit

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: tql now() function

On every date attribute, you can put operator "Changed" and "Uncanged" to compare the TQL with the now moment. Keep in mind that if you put this into enrichment, you have to schedule it through the scheduler, since it cannot be "activated" and run constantly. 

changed-unchanged.png

Petko

 

Likes are appreciated!
Highlighted
Honored Contributor.
Honored Contributor.

Re: tql now() function

Hello Petko,

The "changed / unchanged" operators don't work im my case but thanks to your suggestion I was able to figure out the proper qualifiers.

I'm trying to query all the Digital Certificates that have a "Valid to"  that occurs within 90 days or that have already passed.

- The first part of the query is "ValidTo Occurs within 2160 hours"

- It is for the second part of the query (certificates that have already expired) that I was looking for a "now" function. 

- The correct query to use for that is "NOT ValidTo Occurs after 0 Hours"

That will give me the list of all expired certificates using the time the query is executed.

Thanks again,

Benoit

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.