setws()

Function group Execute on client Platform(s)
Date and Time NO All

Syntax

setws(datepart)

Description

Sets the beginning of the week using one of the day of the week datepart constants, e.g. kSunday. This affects the value returned by the functions dpart(), fday() and lday().

It returns the previous value so you can save it for later use. If the datepart is invalid this function still returns the week start but does not change it.

The datepart constants that you can use are: kSunday, kMonday, kTuesday, kWednesday, kThursday, kFriday, kSaturday.

Example

Calculate lDate as  setws(kMonday)
# sets Monday as the week start