• speruri
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I have a situation where i will get the user locale date in APEX using 

DateTime dateTimeToFormat = DateTime.valueOf( value );
Date dateToFormat = dateTimeToFormat.date();
String formattedDatewithUSER_LOCALE = dateToFormat.format();

For example, if the localecode is en_US and timezoneid is America/Los_Angeles, then the date i would get is 9/1/2016. 

In my java code, i would get all this info along with date, locale, time zone. Along with this, i would get a date like 2016-09-01 18:42:37 as input and the requirement is to format the input date to the user date based on the locale, timezone. 

Any sugesstions..?




 
  • September 02, 2016
  • Like
  • 0
I have a situation where i will get the user locale date in APEX using 

DateTime dateTimeToFormat = DateTime.valueOf( value );
Date dateToFormat = dateTimeToFormat.date();
String formattedDatewithUSER_LOCALE = dateToFormat.format();

For example, if the localecode is en_US and timezoneid is America/Los_Angeles, then the date i would get is 9/1/2016. 

In my java code, i would get all this info along with date, locale, time zone. Along with this, i would get a date like 2016-09-01 18:42:37 as input and the requirement is to format the input date to the user date based on the locale, timezone. 

Any sugesstions..?




 
  • September 02, 2016
  • Like
  • 0