Function ibvAgeBandDays

Description

This function is given two dates, a base date to age from and the date of a posting. It produces an age band value that splits conventionally according less than 30, less than 60 less than 90 n so on and returns the result as a string, chosen to sort correctly.

The routine will work for four bands (three cutoff points) or seven (six cutoff points).

Parameters

pBaseDate The date to age from
pPostDate The date of the posting
pBands The number of bands (4 or 7)
Returns The Age band as a string