Hardik Joshi
Hardik Joshi

Reputation: 9507

get date format from given date in android

Hello i am new in android. Can anybody help me to find how i get date format Sun 15th July from 2012-07-15? I found examples but each of it is for various different date-formats. Please help me to find this.

Upvotes: 0

Views: 254

Answers (1)

V.J.
V.J.

Reputation: 9580

try to get idea from my another answer in [Convert Date time in “April 6th, 2012 ” format][1]

[1]: Convert Date time in "April 6th, 2012 " format here you can only change the April to Sun and 2012 to month.

Like:-

DateFormatSymbols symbols = new DateFormatSymbols();
symbols.setShortWeekdays(new String[]{"Sun","Mon"....});
SimpleDateFormat format = new SimpleDateFormat("EE", symbols);

from this code you will get Days in "Sun,Mon,Tue..." Short Format

So pass this symbols in your SimpleDateFormat class.

Upvotes: 1

Related Questions