You need to sign in to do that
Don't have an account?

time in hh:mm format
Hi ,
I have the below following code which displays both time and date , but i want to display only the time and not the date,
if(callReppaMap.get(ac.personContactId)!=null){
DateTime dt=System.now();
String dtStr=dt.format('HH:mm');
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c);
}else{
paDet.crdate='';
}
Please help me out with my case
Thanks in Advance
To get just the time you can do:
Dt.time():
its throwing me an error , can u just tell me the changes that i need to make in my code
if(callReppaMap.get(ac.personContactId)!=null){
DateTime dt=System.now();
String dtStr=dt.format('HH:mm');
paDet.crdate=String.valueof(callReppaMap.get(ac.personContactId).Date__c);
}else{
paDet.crdate='';
}