Oracle 12 set user password Expiration date or EXPIRED(Grace)
You have to use a profile and a combination of password_life_time and password_grace_time; Lifetime will set the expiry time of password and grace_time will warn them (after expiry) as you'd expect. All you then need to do is assign the profile to user or users (using alter user).

A quick demo? 

SQL&gt; set echo on
SQL&gt; drop user testa cascade;
User TESTA dropped.
SQL&gt; create user testa identified by testa;
User TESTA created.
SQL&gt; grant create session to testa;
Grant succeeded.
SQL&gt; prompt this connection should be successful as there is no profile attached.
this connection should be successful as there is no profile attached.
SQL&gt; conn testa/testa
Connected.
SQL&gt; connect as a dba user
Connected.
SQL&gt; drop profile test_profile;
Profile TEST_PROFILE dropped.
SQL&gt; -- using profile i am setting password to expire in about 10 seconds useful for our testing 
SQL&gt; -- 0.0001158 is about 10 (10/86400)
SQL&gt; -- grace time is set to 1 day
SQL&gt; create profile test_profile limit password_life_time 0.0001158 password_grace_time 1;
Profile TEST_PROFILE created.
SQL&gt; -- now you assign the profile to the user who should get warning .
SQL&gt; alter user testa profile test_profile;
User TESTA altered.
SQL&gt; exec dbms_lock.sleep(20);
PL/SQL procedure successfully completed.
SQL&gt; prompt this connection should show a warning 
this connection should show a warning
SQL&gt; conn testa/testa
ERROR:
ORA-28002: the password will expire within 1 days
Connected.
SQL&gt; select account_status ,expiry_date, PROFILE, sysdate from user_users;
ACCOUNT_STATUS   EXPIRY_DATE         PROFILE        SYSDATE            
---------------- ------------------- -------------- -------------------
EXPIRED(GRACE)   03/21/2017 14:56:00 TEST_PROFILE   03/20/2017 14:56:00