Hi @rabinda77 ,
I tried to create a new login with default 42 days password expiration and executed your query with matching result.
Step One: Set the login properties in SSMS.
Step Two: Check Window password policies using "secpol.msc".
The result is expected as below:
Please have a try to check above two steps and re-created this login if necessary since your query is working. Thanks.
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.