Hi,
Using the code below, I would like to calculate the number of minutes between the currentmoment and creation of the ticket.
After this I am saving this in a Timespan field.
DateTime createdAt=ticket.getValue("created_at").toDateTime();
Integer secondsToQuote=getCurrentDateTime().diff(createdAt);
Float minsToQuoteFloat = Float(secondsToQuote.toString())/60;
String minsToQuote=minsToQuoteFloat.toString(0);
ticket.setValue("x_time_to_quote",minsToQuote);
ticket.save();
But unfortunately, this is not related to the working hours entered at the priority.
Is there a standard function I can use for this kind of calculation, since it is not obvious to do this calculation manually.
thankx in advance!
niels