BookmarkSubscribeRSS Feed
znhnm
Quartz | Level 8

Hi, I have two date variables on my dateset on Quater Year format. I would like to make a calculation substracting the two dates and see how many quarters have past between two dates. For example, if my Date2 is q3 2022, and Date1 is q1 2021, the new calculated value number_of_quarters should give me 6. How would I make such calculation on VA?

1 REPLY 1
MarkusWeick
Barite | Level 11

 

Hi @znhnm ,

it should be possible in a calculated item with a combination of Operators (SAS Help Center: Reference: Operators for Data Expressions), like 

Parse, substring, ....

Unfortunately my SAS server  is down, so I can't show you a complete example, but the 13th reply to the post character to numeric conversion - SAS Support Communities points towards a solution.

Please keep the community friendly.
Like posts you agree with or like. Mark helpful answers as “accepted solutions”. Generally have a look at https://communities.sas.com/t5/Getting-Started/tkb-p/community_articles

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 488 views
  • 0 likes
  • 2 in conversation