Skip to main content
Level 4
Dec 27, 2023 1:44 PM UTC
Solved

Calculating month difference in Query activity

Hi

There is a requirement to find the month difference and what all the values in the month difference should be subtracted from 10.
For example, if the month difference is 3, the result should 10-3.
The answer will be 7, so I'd have to query in query activity

FYI-There is an attribute called date, and it has a date datatype. I tried below approach  , and to continue, I need to subtract from 10.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Dec 27, 2023 2:09 PM UTC

Hi @vani97 ,

Use the below expression,

10-(MonthsDiff(GetDate(),@confirmdate ))

~  ParthaSarathy S

2 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Dec 27, 2023 2:09 PM UTC

Hi @vani97 ,

Use the below expression,

10-(MonthsDiff(GetDate(),@confirmdate ))

Translate
~  ParthaSarathy S
vani97Author
Level 4
Dec 29, 2023 7:07 AM UTC

Its working Fine Thanks !

 

Translate