Thread: GetDay error
View Single Post
Old October 8th, 2012, 07:58 AM   #2 (permalink)
Kostas G
Junior Member
Join Date: Aug 2012
Location: Athens, Greece
Posts: 42
Carrier: Not Provided

Thanks: 6
Thanked 7 Times in 7 Posts

It isn't evident what the mDpDate field is, but you don't need it. This is enough:

Calendar cal = Calendar.getInstance();
DateFormat formatter = new SimpleDateFormat("EEEE");
String date = formatter.format(cal.get(Calendar.DAY_OF_WEEK));
Calendar.getInstance() will return an instance based on current time. If you want to change the day through a field, then post the code that modifies the mDpDate.
Kostas G is offline  
Reply With Quote