The logic is good, you just need to adapt the example i gave to fit your programme:
you'll have to create 2 DateTime values for startDate and endDate.
so within the foreach loop you'll have something that look like the below:
<pre lang="xml">DirectoryEntry user = new DirectoryEntry("LDAP://" + result.GetDirectoryEntry().Properties["distinguishedName"].Value.ToString());
if(user.Properties["whenCreated"].Value > startDate && user.Properties["whenCreated"].Value < endDate)
{
Console.WriteLine(user.Properties["cn"].Value.ToString() + " - " + user.Properties["whenCreated"].Value.ToString());
}