× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Read the fine print on DAYS_UNTIL_PASSWORD_EXPIRES on USER_INFO
<snip>
The number of days until the password will expire. Contains null if the
password will not expire within the number of days specified by the
password expiration warning (QPWDEXPWRN) system value.
</snip>
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/rzajq/rzajqviewuserinfo.htm

Stick to something like
select
AUTHORIZATION_NAME,
DATE_PASSWORD_EXPIRES,
DAYS_UNTIL_PASSWORD_EXPIRES,
days(DATE_PASSWORD_EXPIRES) - days(current date) as
REAL_DAYS_UNTIL_PASSWORD_EXPIRES
from QSYS2.User_info
order by REAL_DAYS_UNTIL_PASSWORD_EXPIRES asc;

"real" will return a null if their password never expires
(DATE_PASSWORD_EXPIRES is null). At least in Run SQL Scripts. Perhaps
that nulls errors? If in doubt, wrap it in an ifnull.

DARREN 2016-11-08 00:00:00.000000 - 42
PEGGY 2016-12-26 00:00:00.000000 - 90
CHRIS 2017-01-04 00:00:00.000000 - 99
CRAIGS 2017-01-09 00:00:00.000000 - 104
KEVINR - - -

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.