Is it possible to convert a string value to the date format with SWQL somehow?
I have some metrics from custom poller:
"CurrentValue" contains a date in MM/DD/YYYY format (actually a string value), and I want to compare it with the current date minus 180 days.
Comparison is not working with this query, and I think because "CurrentValue" type is not a "date":
SELECT UDCP.CurrentValue, UDCP.Node.Caption FROM Orion.NPM.CustomPollerAssignment UDCP WHERE Displayname = 'Battery_last_test' AND CurrentValue NOT LIKE 'Unknown' AND CurrentValue < ADDDAY( -180, GETDATE() )
It pops timeout error.
Found some info about DateTime function, but I can't make it work:
So I'd like to convert it to the date type before comparison. Is this possible?