Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Edge HMI

GetUserPwdAging

  • Last UpdatedOct 29, 2026
  • 1 minute read

GetUserPwdAging is a built-in function that gets the age of the password for a specified user. The age is the time until the password expires, or if it has already expired, the time since it expired.

Function

Group

Execution

String Exp.

Windows

Windows Embedded

IoT View

Thin Clients

Mobile Access

GetUserPwdAging

Security

Synchronous

Yes

Supported

Supported

Not supported

Supported

Not supported

Syntax

GetUserPwdAging(strUser)

strUser

The name of the user.

Return value

This function returns one of the following values:

Value

Description

less than 0

Number of hours since the password expired. For example, a value of -3 means the password expired three hours ago.

0

  • The specified user does not exist.

  • There is no password aging, typically because the password is set to never expire. For more information, see Creating and configuring groups.

greater than 0

Number of hours until the password expires. For example, a value of 3 means the password will expire in three hours.

Examples

Get the password aging for the user "John":

GetUserPwdAging("John")

Get the password aging for the user who is currently logged on:

GetUserPwdAging(UserName)

In This Topic
Related Links