Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# generate random date of birth but over 18

private Random gen = new Random();
DateTime RandomDay()
{
    DateTime start = new DateTime(1995, 1, 1);
    int range = (DateTime.Today - start).Days;           
    return start.AddDays(gen.Next(range));
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #generate #random #date #birth
ADD COMMENT
Topic
Name
6+2 =