Mar 8, 2019 05:23
Hi
Mar 8, 2019 05:23
@sfdcfox
Mar 7, 2019 14:04
@sfdcfox
please find it on SFSE

https://salesforce.stackexchange.com/questions/252931/need-to-find-how-many-weeks-in-a-month-and-how-many-days-in-same-month-as-well
Mar 7, 2019 13:27
@sfdcfox
Mar 7, 2019 12:54
can u help me here
Mar 7, 2019 12:54
This way I need the code sfdcfox
Mar 7, 2019 12:47
like I told you before

4 week month
17th day 1st email
24th day 2nd email
----------
5 week month
24th day 1st email
31st day 2nd email
Mar 7, 2019 12:47
Bu I want to send email based on the weeks
Mar 7, 2019 12:46
Please check with my code
--------------------
Integer mnth = Date.Today().month();
Integer date_value = Date.Today().day();

if(mnth == 2 || mnth == 4 || mnth == 6 || mnth == 9 || mnth == 11){

if(date_value==17){
System.debug('Send 17th date email');
}
if(date_value==24){
System.debug('Send 24th date email');
}
}

if(mnth == 1 || mnth == 3 || mnth == 5 || mnth == 7 || mnth == 8 || mnth == 10 || mnth == 12){

if(date_value==24){
System.debug('Send 24th date email');
}
if(date_value==31){
System.debug('Send 31st date email');
Mar 7, 2019 12:27
using that sunday I need the count of number of weeks for current month
Mar 7, 2019 12:26
Assume First Sunday would be the starting week of the month
Mar 7, 2019 12:13
Its very urgent for me
Mar 7, 2019 12:12
this way I did not using that
Mar 7, 2019 12:12
It may take more to time to get answer
Mar 7, 2019 12:08
Hi
Mar 7, 2019 12:08
@sfdcfox
Mar 7, 2019 06:17
are you there?
Mar 7, 2019 06:17
@sfdcfox
Mar 7, 2019 05:55
@sfdcfox
HI
Mar 7, 2019 05:43
@sfdcfox
Mar 7, 2019 05:34
Can you help here?
Mar 7, 2019 05:23
So, Based on Sunday
Need to count the weeks in the current month
Mar 7, 2019 05:22
First of the month is Sunday
Mar 7, 2019 05:21
I had come with one idea But need to implement
Mar 7, 2019 05:19
hi
Mar 7, 2019 05:18
@sfdcfox
Mar 6, 2019 10:22
Yeah. Thank you.
Mar 6, 2019 10:20
Okay. sfdcfox. I will try with my knowledge. If I get any doubts I will try get contact you again(Not now)
Mar 6, 2019 10:13
How to find thus a month a contains 4 weeks or 5 weeks?
Mar 6, 2019 10:13
That's Okay. But Can you give me any idea that which is I am asking below
Mar 6, 2019 10:04
So here I am getting little confuse to get clarity for both 24th dates.
Mar 6, 2019 10:03
-------------------------------
If it is 4th week of 24th I should send one email(If month contains 4 weeks)
If it is 5th week of 24th I should send another email(If month contains 5 weeks)
Mar 6, 2019 10:00
but here my confusion is How could make sure with 24th date.. ????
Mar 6, 2019 09:59
Based in the schedule, If the current date is 17th, then one email need to sent.
If the current date is 31st, then one email need to sent.
Mar 6, 2019 09:58
I will schedule the class for 17th, 24th and 31st.
Mar 6, 2019 09:52
That's depend on the month. Can't we count weeks in a month based on year?
Mar 6, 2019 09:47
That is my requirement, Could you help me with the logic
I am also trying from my side
Mar 6, 2019 09:46
I would like to send out an email to the customer automatically every month on the below dates
The day to send out the email will depend on whether it’s a 4- or 5-week month
4 week month
17th day 1st email
24th day 2nd email
----------
5 week month
24th day 1st email
31st day 2nd email
Mar 6, 2019 09:45
I have a new requirement. Could you please help in this
Mar 6, 2019 09:44
Hope you are doing well.
Mar 6, 2019 09:44
Thank you for coming sfdcfox
Mar 6, 2019 09:42
Hi
Mar 6, 2019 09:42
@sfdcfox
 
Jul 20, 2018 09:03
ok
Jul 20, 2018 07:49
Hope you are doing great.
Jul 20, 2018 07:48
Hi
Jul 20, 2018 07:48
@sfdcfox
Jul 17, 2018 07:43
Just now I raised my question. You can see it on
https://salesforce.stackexchange.com/questions/225293/malformed-json-expected-at-the-beginning-of-list-set-n-nclass-system-json-d
Jul 17, 2018 07:42
Hi
Jul 17, 2018 07:42
@sfdcfox