Calculating month difference in Query activity | Community
Skip to main content
Level 4
December 27, 2023
Solved

Calculating month difference in Query activity

  • December 27, 2023
  • 1 reply
  • 775 views

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.
Best answer by ParthaSarathy

Hi @vani97 ,

Use the below expression,

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

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
December 27, 2023

Hi @vani97 ,

Use the below expression,

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

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
vani97Author
Level 4
December 29, 2023

Its working Fine Thanks !