Function group | Execute on client | Platform(s) |
---|---|---|
Date and Time | NO | All |
fday(datepart,date)
Returns the date of the first day of the year, month, week or quarter in which the specified date falls.
The period is specified using one of the following datepart constants: kYear, kQuarter, kMonth, kWeek.
Calculate lDate as fday(kWeek,#D)
# returns May 4, 2003 if the start of the week is set to Sunday
Calculate lDate as fday(kQuarter,#D)
# returns April 1 2003, that is, the first day of the quarter in which today falls, #D is May 8, 2003