vb.net Code:
Dim str As String = "19840906"
Dim dt As Date = Date.ParseExact(str, "yyyyMMdd", Nothing)
then you have a Date object that represents the sixth day of September in 1984. It has no format. Internally it's just a number. If you need to use a Date in a calculation, store it in a database or whatever, that is the value you use. Now, if you want to DISPLAY that date to the user in a specific format then you must convert it to a String first. It's at that point of conversion that you decide what format you want to use. You could do this: