Category Archives: VB.NET

Generating Random Colors in VB.NET

Here’s how to generate a random color in the hex RGB format “#FFFFFF”. Continue reading

Posted in Random() | Tagged , , , , , , , , , | 3 Comments

Selecting a random database record with SQL

Here’s a “quick and dirty” way of selecting a database record at random. This can be used for things like showing a featured product or a random advert. Continue reading

Posted in ASP.NET, DataRowView, DataView, NEWID(), SQL, TOP, Uncategorized, VB.NET | Tagged , , , , , , , , , | Comments Off on Selecting a random database record with SQL

Calculating Age from Date of Birth in VB.NET

It’s quite common to need to calculate a person’s age from the date of birth they have entered. Here’s the quick and easy way of doing it. Continue reading

Posted in DateDiff(), DateInterval, DateValue(), Math.Floor(), Now(), VB.NET | Tagged , , , , , , | 11 Comments