Format date

  • Thread starter Thread starter simon
  • Start date Start date
S

simon

I have date="11.6.2004"(today) and I would like to format it as: 20040611

How can I do that?

Thank you,
Simon
 
You can always Use DatePart and build your own string but extracting Year,
and Month and Day separate

Dim MyNewDate as String = DatePart(DateInterval.Year, MyDate) &
DatePart(DateInterval.Month, MyDate) & DatePart(DateInterval.Day, MyDate)


/Lars Netzel
 
Back
Top