Display accounts which were closed in the last 30 calendar days

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 5 months ago #22806 by ORLY01
Hi,

How to create an enquiry which displays the accounts that were closed in the last 30 calendar days?
I tried to use the CDD function in order to find the # of days between 'today' and 'last update date', but this function did not work.

Can you please advise?

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
4 years 5 months ago #22807 by VK
Hi
I presume you used CDD in jBC code?

Instead you can try to use ICONV() for 'today' and 'last update date' to convert them to internal format and then calculate the difference.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 5 months ago #22808 by ORLY01
I use the regular enquiry in the application (not a code).
Do you know how can I do it in the application?

Can you please give me an example?

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
4 years 5 months ago #22809 by VK
Hi
in enq you can use constructions like:

!TODAY
!TODAY-30C

... something like that.. I'm not very big fan of enquiry "language" so I usually just use NOFILE or jBC as BUILD.ROUTINE.

Cheers
VK

Please Log in or Create an account to join the conversation.

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
4 years 5 months ago #22814 by ORLY01
Thanks! it works :)

I have another question.
I tried to do it in the fixed selection field and to compare it to DATE.TIME:
DATE.TIME GE !TODAY-30C

But for some reason, it does not rerun the correct values. I think it relates to the format of the field.
TODAY is a date without time and DATE.TIME also contains the time.
Can you please assist? what should I do?

Please Log in or Create an account to join the conversation.

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Globus:G9-G13|TAFC:R05-R23|TAFJ:R19,R23,R24:test
More
4 years 5 months ago #22816 by VK
Hi
other than to use BUILD.ROUTINE I can only suggest to create an I-descriptor that contains only date part of DATE.TIME. Use [1,6] to extract only the date, don't forget to add '20' to the beginning since DATE.TIME only contains YY and not YYYY.

Cheers
VK

Please Log in or Create an account to join the conversation.

Time to create page: 0.073 seconds