Random Time

The $RTime function generates random time and has the following parameters:

  1. (optional) Format. See date and time formats for details. The default is HH:MM:SS
  2. (optional) Low border. Default is 00:00:00
  3. (optional) High border. Default is 23:59:59


  • function call, local or global variable are acceptable for range definition.
  • The function fixes wrong parameters automatically: hour to [0:23] range, minutes, and seconds to [0:59] range.


  1. $RTime() - means $RTime(HH:MM:SS,00:00:00,23:59:59)
  2. $RTime(HHMM)
  3. $RTime(HHMMSS,000000,100000)