You need to sign in to do that
Don't have an account?
SFDC 007
time format repn in GMT Format
Hi,
I wanted to display the time according to the users time zone,
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));
I am displaying the time but thats not in gmt format, Tell me how to do it.
Thanks in Advance
Modify the hh:mm to HH:mm. Capitalized H represents time in 24 hour clock.
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('HH:mm'));
All Answers
hi use today or system.today method .
u can also see this link may be it will help full to u.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_system.htm
nopes i am able to display the time, but my problem is i am displaying it in indian standard time, for example 14.00 is displaying as 2.00 for me, so just need to disply time in their country format
I guess you want to display the time in 24 hour format :-
.format('HH:mm')
Please see the link below for complete formatting of date/time :
http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
yes , correct , say if time is 14.00 it should be displayed as 14.00 not as 2.00 which is displaying for me right nw, need ur help on this to fix it.
Kindly help me wat to do
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('hh:mm'));
this is my time declaration part.
Thanks
Modify the hh:mm to HH:mm. Capitalized H represents time in 24 hour clock.
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c.format('HH:mm'));