Adobe Campaign Classic v7
QUERY: Find the first day of the current month and then add two months
Example: Today: 11/22/2022 First Day of Month: 11/01/2022 Plus two months: 01/01/2023
My process has: checkDate before toDate(ToInteger(day of ToDate(current date) - 1) days before) + 2 month(s) in query window but does not work.
How do you write this query?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello,
To identify first day of the month, you can use the Function YearAndMonth(<Date>). After that you just have to add two months. So you'll have something like this:
AddMonths(YearAndMonth(GetDate()), 2)
I hope this helps you.
Best.
Hello,
To identify first day of the month, you can use the Function YearAndMonth(<Date>). After that you just have to add two months. So you'll have something like this:
AddMonths(YearAndMonth(GetDate()), 2)
I hope this helps you.
Best.
Hi @TJFORCE68
You can use the below code in your Query activity in advance selection :-
Day(DateOnly(GetDate())) - (Day(DateOnly(GetDate())) - 1 )+'/'+ Iif((Month(DateOnly(GetDate())) + 2) > 12, (Month(DateOnly(GetDate())) + 2) - 12 , (Month(DateOnly(GetDate())) + 2)) + '/' + Iif((Month(DateOnly(GetDate())) + 2) > 12, Year(DateOnly(GetDate())) +1 , Year(DateOnly(GetDate())))
Regards
Views
Likes
Replies
Views
Likes
Replies