Display accounts which were closed in the last 30 calendar days

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 1

ORLY01 created the topic: Display accounts which were closed in the last 30 calendar days

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?
#22806

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • R13|TAFC|jBASE|windoze
  • Posts: 752
  • Thank you received: 108

VK replied the topic: Display accounts which were closed in the last 30 calendar days

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
#22807

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

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 1

ORLY01 replied the topic: Display accounts which were closed in the last 30 calendar days

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?
#22808

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • R13|TAFC|jBASE|windoze
  • Posts: 752
  • Thank you received: 108

VK replied the topic: Display accounts which were closed in the last 30 calendar days

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
#22809

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

  • ORLY01
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 1

ORLY01 replied the topic: Display accounts which were closed in the last 30 calendar days

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?
#22814

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

  • VK
  • VK's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • R13|TAFC|jBASE|windoze
  • Posts: 752
  • Thank you received: 108

VK replied the topic: Display accounts which were closed in the last 30 calendar days

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
#22816

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

Time to create page: 0.176 seconds