BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8
I have a condition

Where intck(‘month’, transaction_post_date, “&sampdate.”D)=0;

What does it mean?
4 REPLIES 4
HeatherNewton
Quartz | Level 8
Is it equal to the condition
Where transaction_post_date>=intnx(“month”,”&sampdate.”d,-12,”B”)
?
Kurt_Bremser
Super User

No. When the result of INTCK is 0, it means that both dates are within the same interval. Your condition would also validate all dates after the month.

Study the documentation of the INTCK Function 

 

Edit: fixed a typo

HeatherNewton
Quartz | Level 8
What if I add one more line to Code A

Code A is as follows:

Where trasaction_post_date >=intnx(“month”,”&sampdate.”d,-12,”B”)
And transaction_post_date<=“&sampdate.”d

If today is sampdate, trasaction_post_date in code A refers to dates from 1st Oct 2021

Code B is as follows:
Where intck(‘month’,’transaction_post_date,”&sampdate.”d)=0;

If today is sampdate, transaction_post_date in Code B refers to any dates within Oct 2022...

Is my interpretation above correct?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 719 views
  • 1 like
  • 2 in conversation