Sage 200 Report Designer - Calculations with dates using the Now() function
Description

How to find a transaction report with a document date in the future.

This article has been prepared and issued to you as a goodwill gesture only and Sage accepts no liability or responsibility for its use. For further support please refer to your Business Partner.

Cause
Resolution

You can use the Now() function in Report Designer to find the current date and time. Using this function, you can calculate the difference between todays date and the date stored in a variable you are interested in. In the following examples, the variable is the document date for POP Order Returns.

Example using POP Order Returns

(Now()-POPOrderReturns.DocumentDate)

Calculates the difference between Now and the POP Document Date and returns the number of days difference. If the order was a year in the future it would return -365.00. If the order was a year in the past the expression would return 365.00

To use this filter to find all orders with a document date in the future, use the following expression:

((Now()-POPOrderReturns.DocumentDate)<0) will find all order dates in the future.

((Now()-POPOrderReturns.DocumentDate)>0) will find all order dates in the past.

Any result greater than 0 is in the past. Any result less than 0 is in the past.

You can use the same basic expression but with added parameters to get more detailed results.

((Now()-POPOrderReturns.DocumentDate)>0)and((Now()-POPOrderReturns.DocumentDate)<7) will find all orders within the last seven days, but not in the future.

Note: If you are viewing this article from the Sage website, a list of Sage 200 Report Designer articles are now .

 


Sage Business Partners can now log new cases online!

If you're unable to find the help you require from our online resources, log a new case with us without having to use phone or email. Simply select 'Manage your cases' from the dashboard or visit my.sage.co.uk/cases.

 

 

Steps to duplicate
Related Solutions