Java tutorial
import java.text.ParseException; public class MainClass { public static void main(String[] args) throws ParseException { java.util.Date today = new java.util.Date(); java.sql.Date date = new java.sql.Date(today.getTime()); java.util.GregorianCalendar cal = new java.util.GregorianCalendar(); cal.setTime(date); System.out.println(cal.get(java.util.Calendar.DAY_OF_WEEK)); } }