I am trying to subtract two list of dates - but can not figure out how to do it.
I have an table - Order, with the following fields:
order_id
order_date
delivery_date
city
I want to find out the average delivery time in days for a given city (so I can display expected delivery date when a user enter city name/pin code). How do I subtract the list of “delivery_date” and “order_date”?
Yes, you can do this be creating a number field under your Order type called “Delivery_Time”. When Delivery Date is ready to be saved to the order, you’d make a change to the order:
Delivery_Time = Delivery_Date minus Order_Date :formatted as days
Then to display the average to the user in a text element, you can do a search: Search for Orders Delivery_Time :average. The search should also have the city constraint.