How to Use Weekdays & Weekends in Salesforce Formulas (Beginner)

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 19

  • @kellenkirby5294
    @kellenkirby5294 2 месяца назад +1

    Awesome job explaining this! Thank you!

  • @JamesMejia-wh3by
    @JamesMejia-wh3by Год назад +1

    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

    • @employedforgood
      @employedforgood  Год назад +1

      Thanks for watching/commenting, best of luck!

    • @JamesMejia-wh3by
      @JamesMejia-wh3by Год назад

      @@employedforgood I subscribed to your channel and will watch all your videos!

  • @Brian_Mendoza
    @Brian_Mendoza 2 года назад +1

    A very elegant and simple solution! Very much appreciated.

  • @COLI-UK
    @COLI-UK Год назад +1

    Amazing explanation. Love it.

  • @GREGORYPETIT-k5z
    @GREGORYPETIT-k5z Год назад +1

    So helpfull ! And thank you for the switch confy/compact tips :)

  • @patriciaboyce8143
    @patriciaboyce8143 6 месяцев назад

    This looks like my starting place! What would the formula be to have the DATE plus 3 business days? Thanks

    • @employedforgood
      @employedforgood  5 месяцев назад

      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(

  • @Sezro
    @Sezro Год назад

    This was really help helpful. So many other examples confuse me.

  • @rohitch1018
    @rohitch1018 Год назад +1

    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?

    • @employedforgood
      @employedforgood  Год назад

      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)

  • @alishaik2763
    @alishaik2763 Год назад

    How to calculate the business day of the current month ?

    • @employedforgood
      @employedforgood  Год назад

      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()))

  • @rodrigoandrade4554
    @rodrigoandrade4554 Год назад

    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)

    • @employedforgood
      @employedforgood  Год назад +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.