Convert string value to integer for comparison

how to convert string value to integer so that i can make some comparison with < or > values

q:preceding text of first “days” of (((maximum password age of security database) - (password age of users of logged on users)) as string))
A: 55
T: 0.033 ms

q: if (preceding text of first “days” of (((maximum password age of security database) - (password age of users of logged on users)) as string)) > 50) then “ok” else error “Pls check password”

q:if (preceding text of first “,” of (((maximum password age of security database) - (password age of users of logged on users)) as string)) is greater than “60 days” as string then “Password is good” else "password is about to expired"
A: password is about to expired
T: 0.038 ms

<string> as integer : integer
Returns an integer value for the string provided. If the string contains anything but ASCII digits, the conversion will fail. Use numeric value for more liberal parsing rules.

https://developer.bigfix.com/relevance/reference/string.html

2 Likes

You can convert those “days” into integer with /day

q: (50*day)
A: 50 days
I: singular time interval


q: (50*day) /day
A: 50
I: singular integer