Query report to find date

how to fine days from purchase order date to purchase receipt date in query report.
i use below code but not working:

DATEDIFF(tabPurchase Receipt.actual_receipt_date , tabPurchase Order.transaction_date) as “Time Taken:Date:100”

please help me

Is this date mentioned in the Purchase Order/Receipt doctype itself or in their child doctypes i.e. Purchase Order/Receipt Item

If they are in the child rows then you cannot access these directly like this. You will need to join.

1 Like

@root13F, ‘actual_receipt-date’ is in “Purchase Receipt” doctype and ‘transaction_date’ is in “Purchase Order” doctype.

so i need number of days taken from Purchase Order to Purchase Receipt