SP_BEGEND

BEGEND()

  Short:
  ------
  BEGEND() Determines beginning or end of week,month or quarter

  Returns:
  --------
  <dReturnDate> => Date of  beginning/end of week,month,qtr

  Syntax:
  -------
  BEGEND(dStartDate,nBeginEnd,nWkMnthQtr,[nDayofWeek])

  Description:
  ------------
  Returns date which is beginning (1) or end (0)
  <nBeginEnd> of week (1) , month (2) ,or quarter (3)
  <nWkMnthQtr> in which input date <dStartDate> falls. If week,
  [nDayofWeek] is day of the week beginning or end of the week
  <nBeginEnd> falls on, with Sunday being 1 and Saturday being 7.

  Examples:
  ---------
   dDate := ctod("01/15/90")
   bow   := BEGEND(dDate,1,1,1)  // beg of week
   eow   := BEGEND(dDate,0,1,7)  // end of week
   bom   := BEGEND(dDate,1,2)    // beg of month
   eow   := BEGEND(dDate,0,2)    // end of month
   boq   := BEGEND(dDate,1,3)    // beg of quarter
   eoq   := BEGEND(dDate,0,3)    // end of quarter

  Source:
  -------
  S_BEGEND.PRG

 

2 responses to “SP_BEGEND

  1. Pingback: SP Date Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.