The NEXT_DAY function gives you DATE of the DAY according to DAY you mentioned in SQL. The DAYNAME function gives you the name of the DAY. Below are the best DB2 examples.
You can opt-out anytime you want.
SQL Query Example NEXT_DAY.
SELECT ORDER_DATE ,SHIP_DATE(ORDER_DATE, 'MONDAY') FROM ORDER_TABLE WHERE EXTRACT(YEAR FROM ORDER_DATE) = 2019;
It calculates following MONDAY Date from ORDER_DATE.
SQL Query Example DAYNAME, DAYOFWEEK, MONTHNAME.
SELECT CURRENT TIMESTAMP ,DAYNAME(CURRET TIMESTAMP) ,DAYOFWEEK(CURRENT TIMESTAMP) ,MONTHNAME(CURRENT TIMESTAMP) FROM SYSIBM.SYSDUMMY1;
The above query extracts Day name, Day of week, and Month name.