+ Start a Discussion
Noemi MigliaccioNoemi Migliaccio 

how to eliminate seconds from timesheet entries

Hi I need to know how to eliminate seconds from timesheet entries... FSEs keep on getting stuff like 2.98, 4.99 hours to justify on service results. Can someone help me?
Hemant_SoniHemant_Soni
Hi Noemi,
Can you please share your requirement like below example : 
Current Values : xyz
Expected Result : result.
This help me to give you proper solution. 

If you need to discuss you can direct contact me on sonihemant.jaipur@gmail.com
ShirishaShirisha (Salesforce Developers) 
Hi Noemi,

Greetings!

Can you please check the below thread to find the logic to eliminate the seconds from the time.

https://stackoverflow.com/questions/58659589/removing-seconds-from-time-and-rounding-the-minutes

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Noemi MigliaccioNoemi Migliaccio
so if I log time on timesheet entries, it would come out as the following examples : 09:00:54; 10:00:36  It's an issue 'cause on Service Result the time does not add up to an hour then.I'd like the result to be: 09:00; 10:00 and so on. Minutes are okay, I don't need to round 'em up, but seconds are becoming an issue.
I'll also check the code provided by Shirisha.
Thank you!
Hemant_SoniHemant_Soni
Hi Noemi,
According to me very simple solution to do this is apex is 
String str = '09:00:54';
system.debug('====================================== : '+str.substring(0, str.lastIndexOf(':')));

Please let me know your thoughts.