API/routine to calculate week days

 4 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
Chesca
Veteran Member
Posts: 490
Veteran Member
    Is there an API/routine tha calculates weekdays only?
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi bernfc10 - What exactly are you looking for?  Are you trying to determine whether a date is a weekday, or are you trying to count weekdays, or something else?
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      Woozy
      Veteran Member
      Posts: 709
      Veteran Member
        I just checked the "Lawson 4GL Application Program Interfaces" document, and found several APIs that could help with this.

          - 900-DAY-FROM-DATE - Calculates the day of the week for the input date (1=Sunday, 2=Monday, etc).
          - 900-GET-WEEKDAY-LIT - Converts the date to a display format of the name of the day of the week. Detects the end user’s locale and

        translates the weekday literal for that locale. (full weekday literal, not abbreviation)
          - 905-GET-WEEKDAY-LIT - Returns the translated day of the week name for a date, based on locale.

        Kelly


        Kelly Meade
        J. R. Simplot Company
        Boise, ID
        Chesca
        Veteran Member
        Posts: 490
        Veteran Member
          Hello and thank you for prompted response. I am trying to count the number of days. I am going to do as you suggested and increment a weekday_counter, thank you
          jaherb
          Veteran Member
          Posts: 164
          Veteran Member
            Bernfc10... Have you looked at the 900-NBR-DAYS-IN-DATE-RNG API? That will count the number of days between two given dates.