This video will surely help me on my ongoing project. I'll comment back if I hit a wall or something and seek your advise. Thank you for making this video! :D
Hi there - sorry for the delay! But short version, it would be the baseline CASE function from the start of the video, nested in an IF statement. Let's call the formula from the video 02:14 . To return the date + 3 business days, this is the logic: - If returns a weekday, add 3 days - If returns Saturday, add 5 days Otherwise, if it's Sunday, add 4 days. So it would look something like this: IF(
Hi @rohitch1018 - I'm going to assume you only add 1 day to Sunday, and not all days. In that case, look at the formula on 2:10 . Instead of returning the day of the week written out via text ("Sunday") when the MOD formula returns 6, you can just add 1. Your formula would probably be a date type, and look something like this: CASE( MOD( {Your Date Field} - DATEVALUE(1900,1,1),7), 6, {Your Date Field} + 1, {Your Date Field}) The first line sets up your case logic, to check for the day of the week The second line says if the formula returns Sunday/6, then add 1 to that date value The third line - your ELSE logic - tells the formula what to do with the other days of the week (which is to just return the date as is)
Hi - I'm not sure what this question is asking but feel free to clarify, I'll try to answer. To grab the current month, it would probably be MONTH(TODAY()) OR MONTH(DATEVALUE(TODAY()))
Would you be able to tell me what this formula is doing? YEAR(NU__EndDate__c) + FLOOR((MONTH(NU_Product2__r.NU__SubscriptionGracePeriod__c) /12), MOD(MONTH(NU_EndDate__c) + NU_Product2__r.NU_SubscriptionGracePeriod_c,12) +1, 1)
Hey Rodrigo! I tried plugging this into my Salesforce environment (using my own 2 date fields), but the formula syntax is giving me errors... Any chance the copy/paste here is incomplete? I'm assuming both fields in your question are date format, let me know if not.
Awesome job explaining this! Thank you!
This video will surely help me on my ongoing project. I'll comment back if I hit a wall or something and seek your advise. Thank you for making this video! :D
Thanks for watching/commenting, best of luck!
@@employedforgood I subscribed to your channel and will watch all your videos!
A very elegant and simple solution! Very much appreciated.
Thanks Brian, glad to hear it!
Amazing explanation. Love it.
So helpfull ! And thank you for the switch confy/compact tips :)
Ha you got it! Thanks for commenting!
This looks like my starting place! What would the formula be to have the DATE plus 3 business days? Thanks
Hi there - sorry for the delay! But short version, it would be the baseline CASE function from the start of the video, nested in an IF statement.
Let's call the formula from the video 02:14 . To return the date + 3 business days, this is the logic:
- If returns a weekday, add 3 days
- If returns Saturday, add 5 days
Otherwise, if it's Sunday, add 4 days. So it would look something like this:
IF(
This was really help helpful. So many other examples confuse me.
what if I want to add not subtract days like if it is Sunday i want to update it to monday like add 1 day how do i do that?
Hi @rohitch1018 - I'm going to assume you only add 1 day to Sunday, and not all days. In that case, look at the formula on 2:10 . Instead of returning the day of the week written out via text ("Sunday") when the MOD formula returns 6, you can just add 1. Your formula would probably be a date type, and look something like this:
CASE( MOD( {Your Date Field} - DATEVALUE(1900,1,1),7),
6, {Your Date Field} + 1,
{Your Date Field})
The first line sets up your case logic, to check for the day of the week
The second line says if the formula returns Sunday/6, then add 1 to that date value
The third line - your ELSE logic - tells the formula what to do with the other days of the week (which is to just return the date as is)
How to calculate the business day of the current month ?
Hi - I'm not sure what this question is asking but feel free to clarify, I'll try to answer. To grab the current month, it would probably be MONTH(TODAY()) OR MONTH(DATEVALUE(TODAY()))
Would you be able to tell me what this formula is doing?
YEAR(NU__EndDate__c) + FLOOR((MONTH(NU_Product2__r.NU__SubscriptionGracePeriod__c) /12),
MOD(MONTH(NU_EndDate__c) + NU_Product2__r.NU_SubscriptionGracePeriod_c,12) +1, 1)
Hey Rodrigo! I tried plugging this into my Salesforce environment (using my own 2 date fields), but the formula syntax is giving me errors... Any chance the copy/paste here is incomplete? I'm assuming both fields in your question are date format, let me know if not.