SoftadminUtil.DatePeriod_Boundaries

 Show all Hide all

Returns the start and stop date of the dynamic date interval given by specifying a date interval enum and a reference date.

If you for example are interested in getting the start and stop dates of the preceding month you would set the enum parameter to 'LASTMONTH' and the date parameter to getdate().

This type of functionality is very useful in cases where the user wants the option to choose simple predefined date intervals in reference to a date, such as when creating a subscription to a statistics report etc.

Type: Table-valued function
Area of use: General use

Parameters:

@DateIntervalEnum mandatory varchar(50)
The date interval to use.
Possible value Description
LASTMONTH
LASTWEEK
LASTYEAR
TODAY
WHOLEMONTHSTHISYEAR
YESTERDAY
@ReferenceDate mandatory datetime
The reference date.