im create the date format as follows:
SimpleDateFormat sdf =new SimpleDateFormat("MMM d, EEE, h:mm a");
I need a new line between date, month and time, something like this
thus ,sep 6 4:25pm
therefore, I made the following changes:
SimpleDateFormat sdf =new SimpleDateFormat("MMM d, EEE,"+"\n"+" h:mm a");
he gave me nothing, only he created it in one line as follows:
thus ,sep 6 4:25pm
so I took a format object like this
SimpleDateFormat sdf =new SimpleDateFormat("MMM d, EEE,"); SimpleDateFormat sdf1 =new SimpleDateFormat(" h:mm a");
and did the following:
sdf.format(calendar.getTime())+"\n"+sdf1.format(calendar.getTime())
but he again gives the same result
thus ,sep 6 4:25pm
A calendar is a Calendar object. Any help would be appreciated!
source share