When you retrieve a Date from a Database it will be a .NET
DateTime Type. You can then use it's ToString method to format the date however you want. In your case you want it formatted as "YYYYMMDD" so you would provide that to the ToString method.
The default pattern that the DateTime.ToString() will returns is based on the user's cultural settings. This is set in the operating system. So if the user has a setting that follows the US date format it will return "MMDDYYYY" but if their cultural setting is French it will return "DDMMYYYY".....The underlying data for the DateTime is actually stored as a number.
This cultural setting is not only applied to dates. There is a way to over write the cultural setting of the operating system so that your application works in the cultural setting that you are expecting. There's a few ways to do this actually...
But I think that the ToString solution that I mentioned will work for your needs.
-Frinny