cancel
Showing results for 
Search instead for 
Did you mean: 

date formate for a locale

Former Member
0 Kudos

Is it possible to have a date format for a locale. ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Praveen, If you are asking how to get the current locale, use

   UISessionUtils.getCurrentSession().getGlobalDataLocale()



for getting the current locale.

Cheers,

Jithin

bhavirisetty
Active Participant
0 Kudos

Hi Praveen,

Yes in java we can achieve with below code,

 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, yourLocale);
 String formattedDate = df.format(yourDate);

Thanks