How to Get Day Names in Oracle Database: Oracle Operators: TO_CHAR() DATE NLS_DATE_LANGUAGE Problem: You want to extract the day of the week from a date in Oracle. Solution 1: To extract the day name from the date, use the TO_CHAR() function. The first parameter is the date and the second is the format in which we want to output the date. To extract the day name, the format should be ‘Day’ : SELECT TO_CHAR(DATE '2022-01-01', 'Day') FROM DUAL; The result is ‘Saturday’. Discussion: This is not the only format you can use to extract day names. Here are several alternatives: ‘DAY’ would return ‘SATURDAY’ ‘day’ would return ‘saturday’ ‘DY’ would return ‘SAT’ ‘Dy’ would return ‘Sat’ ‘dy’ would return ‘sat’ ‘D’ would return 7 (based on the range 1-7, from Sunday to Saturday) You can also extract the day name in another language. To do this, you need to use the third parameter, NLS_DATE_LANGUAGE. This parameter can take any valid language name; you can find more on this in NLS_DATE_LANGUAGE’s entry in the Oracle documentation. Let’s try an example. Solution 2: Let’s extract the day name in German. SELECT TO_CHAR(DATE '2022-01-01', 'Day', 'NLS_DATE_LANGUAGE = German’) FROM DUAL; The result is ‘Samstag’. Recommended courses: SQL Practice Set Recommended articles: Performing Calculations on Date- and Time-Related Values SQL Date and Time Functions in 5 Popular SQL Dialects The Most Useful Date and Time Functions See also: How to Get the Current Date in Oracle How to Get the Date From a String in Oracle Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query