Return a Random Date (VB.NET/ASP.NET)

Category:
C#, VB.NET, ASP.NET
Type:
Snippets
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility: Visual Basic.NET, ASP.NET

More information:
This function returns a random date between the specified start date and the current date. Example:
dim dt as Date
dt = RandomDate("01/01/1975")
System.Diagnostics.Debug.Write(FormatDateTime(dt, DateFormat.ShortDate).ToString)

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: