Use sp_addlogin to set the password expiration interval for a new login.
This example creates the new login “joe” with the password “Djdiek3”, and sets the password expiration interval for “joe” to 2 days:
sp_addlogin joe, "Djdiek3", null, null, null, 2
The password for “joe” expires after 2 days from the time of day the login account was created, or 2 days from when the password was last changed.
password expiration interval specifies the password expiration interval in days. It can be any value between 0 and 32767, inclusive. For example, if you create a new login on August 1, 2007 at 10:30 AM, with a password expiration interval of 30 days, the password expires on August 31, 2007 at 10:30 AM
For details on the syntax and rules for using the new parameter, see sp_addlogin in the Reference Manual: System Procedures.