Generate a set of Ids from a List of SObject
Formatting time in Apex
https://paulforce.wordpress.com/2009/08/27/formatting-time-in-apex/
List<Account> accounts = [SELECT Id, Name FROM Account];
Set<Id> selectedIds = new Map<Id, SObject>(accounts).keySet();
System.debug(selectedIds);
Division of 2 numbers
public static Decimal divide(Integer numerator, Integer denominator) {
Decimal result;
if (denominator != 0) {
result = Decimal.valueOf(Double.valueOf(numerator) / Double.valueOf(denominator));
return result.setScale(2);
}
return 0;
}
Formatting time in Apex
https://paulforce.wordpress.com/2009/08/27/formatting-time-in-apex/