Calculating Lead/Order Shipping Time for a particular Month


Time elapsed between the submission of the sales order and making of corresponding invoice/delivery note to customer = order shipping time.

How do we calculate this Order Shipping Time, which is, the time taken to deliver an order post submission of a sales order.

I would like to calculate the average order shipping time of a particular month. Is there any way to do so?



Is this via Python or through JS? You can use python’s datetime.timedelta function. If you’re going to use an SQL query to get the Sales Order/ Delivery Note/ Sales Invoice dates, MYSQL has a datediff function which you can use.


Herabelle Villanueva
Bai Web and Mobile Lab

1 Like