ENDOFPERIOD function

ENDOFPERIOD (<Period Date>, <Period Type>)

<Period Date> is a DATE type expression used to specify the date of the period;

<Period Type> is on the available period types: MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR, TENDAYS, HALFYEAR.

This function is used to obtain a period end date based on a date within the period range.

Examples:

SELECT EndOfPeriod(DateTime(2002, 10, 12, 10, 15, 34), Week)

Result:

Field1

13.10.2002 23:59:59

SELECT EndOfPeriod(DateTime(2002, 10, 12, 10, 15, 34), Year)

Result:

Field1

31.12.2002 23:59:59

 

See also: Functions of Query Language

1C:Enterprise Developer's Community