I wrote the following code
Date d = new Date();
CharSequence s = DateFormat.format("MMMM d, yyyy ", d.getTime());
But is asking me parameter, I want current date in string format,
like
28-Dec-2011
so that I can set over TextView
,
explain a bit, if you think something is necessary, I am new to Android Development.
You need an instance first
This is nothing to do with android as it is java based so you could use
try this,
You can use following code to get a date in the format you want.
// import Date class as java.util