Former Member

# New Year report date issue

We have a report that has been fine.Now since 2014 was just told that the report is not showing past 'Open Orders' only since Jan 1 2014.

In the report select I see this date formula:

but seems to me it should be showing past 180 days ?

{CROPNORD.ORDER_DATE} > ((DAY(CurrentDate)+MONTH(CurrentDate)*100 + YEAR(CurrentDate)*10000) - 180)

10|10000 characters needed characters exceeded

### Related questions

Posted on Jan 07, 2014 at 01:19 AM

hey Paul,

i'm assuming that you do want the past 180 days, i.e. since july 10, 2013 correct? if so, the second part of the formula seems to be the issue...i'm assuming that the order date is in the format yyyyMMdd and if so, try using the following instead...

{CROPNORD.ORDER_DATE} > tonumber(totext((currentdate - 180),'yyyyMMdd'))

the second part of that formula currently returns 20139926 instead of 20130710. if the order date is in a different format than above, please let us know how that date is derived.

cheers,

jamie

10|10000 characters needed characters exceeded
• Jamie Wiseman Former Member

the second part of the formula returns -73...i.e.

((DAY(CurrentDate)+MONTH(CurrentDate)*100 - 180)) = -73

if you use tonumber(totext((currentdate - 180),'yyyyMMdd')) though you'll return yyyyMMdd but in a numeric format.