Question: For Example I have the date: "23/2/2010" (23th Feb 2010). I want to pass it to a function which would return the **day of week**. How can I do this?

In this example, the function should return `String` "Tue".

Additionally, if just the day ordinal is desired, how can that be retrieved?

Answer: 
```
Calendar cal = Calendar.getInstance(desired date);
cal.setTimeInMillis(System.currentTimeMillis());
int dayOfWeek = cal.get(Calendar.DAY_OF_WEEK);

```

Get the day value by providing the current time stamp.
I use this

```
    String[] weekdays = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");

```

And then

```
weekdays[calendar.get(Calendar.DAY_OF_WEEK) - 1]

```

To get the particular weekday