Return a Random Date (VB.NET/ASP.NET)
Category:
C#, VB.NET, ASP.NETType:
SnippetsDifficulty:
BeginningAuthor:
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: