Posted By:
Akshay_B
Posted On:
Thursday, July 3, 2008 03:04 AM
I want to give users a facility to view the quarters in which the date belongs to, embedded in itself. So, if the user specifies the format as "MMM/dd/yyyy/Q", then I want the output to be, "Jul/02/2008/4". I want to know, how do we allow the SimpleDateFormat to accept this new character "Q" and be able to apply it as the pattern. I tried adding "Q" to the SimpleDateFormat.setDateFormatSymbols (DateFormatSymbols) by adding a "Q" in the DateFormatSymbols object I am passing, but it doesnt help, i am still getting error if I try to apply the pattern including the "Q" in it. Any help would be appreciated :)
More>>
I want to give users a facility to view the quarters in which the date belongs to, embedded in itself.
So, if the user specifies the format as "MMM/dd/yyyy/Q", then I want the output to be, "Jul/02/2008/4".
I want to know, how do we allow the SimpleDateFormat to accept this new character "Q" and be able to apply it as the pattern. I tried adding "Q" to the SimpleDateFormat.setDateFormatSymbols (DateFormatSymbols) by adding a "Q" in the DateFormatSymbols object I am passing, but it doesnt help, i am still getting error if I try to apply the pattern including the "Q" in it.
Any help would be appreciated :)
<<Less