fday()

Function groupExecute on clientPlatform(s)
Date and timeNOAll

Syntax

fday(datepart,date)

Description

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.

Example

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