You need to sign in to do that
Don't have an account?
SFDC_Developer
How to know date format of Users
How to know the date format of the user in salesforce. Basically I want to perform some operation based on user's date format.
Like:
I know we can use Map to store the locale as key and date format as values and then query the locale and get the date format, but it is very lengthy and it will also increase the no. of lines in code.
Like:
If(date_format == dd/mm/yyyy) { do this } if(date_format == mm/dd//yyyy) { do this }
I know we can use Map to store the locale as key and date format as values and then query the locale and get the date format, but it is very lengthy and it will also increase the no. of lines in code.
You can see more details on the user locale here - https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_userinfo.htm#apex_System_UserInfo_getLocale