You need to sign in to do that
Don't have an account?
rrrkitamura
Datetime.format method with timezone doesn't return time-zone-based character of day-of-week.
Hello,
I try to get formatted date string with day-of-week
by using Datetime.format method with timezone argument.
I want Japanese character day-of-week but It returns English day-of-week .
Do you have any idea?
*My personal setting is like these:
Time zone: Asia/Tokyo
location: Japan
Language: Japanese
********************************
Any help will be appreciated.
Thanks,
I try to get formatted date string with day-of-week
by using Datetime.format method with timezone argument.
I want Japanese character day-of-week but It returns English day-of-week .
Do you have any idea?
Code:
public class PackageTestClass { private String getDate(){ Date dateWk = System.today(); Datetime dt = Datetime.newInstance(dateWk.year(), dateWk.month(), dateWk.day()); return dt.format('M/d(EEE)','Asia/Tokyo'); } static testMethod void testManualShareRead(){ PackageTestClass ptc = new PackageTestClass(); System.debug(ptc.getDate()); } }
*My personal setting is like these:
Time zone: Asia/Tokyo
location: Japan
Language: Japanese
********************************
Any help will be appreciated.
Thanks,
http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
i tried at J2SE and it works.
but at apex it doesn't...
well, i'll make utility class to convert day-of-week to japanese character.