Adds a random number of days between 0 and nDays to a date. The random values generated are distributed uniformly.
Kernel.bdh
RndDate( in nDate : number, in nDays : number ): number;
increased date
Parameter | Description |
---|---|
nDate | Input date with format YYYYMMDD |
nDays | Upper boundary of random interval for days to add |
dcltrans transaction TRndDate var nDate: number; begin // add 0 - 20 days to 19961015 nDate := RndDate(19961015, 20); write("date = "); write(nDate); writeln; end TRndDate;
date = 19961022