How to format date when date control is used any idea........... it should display like 01/01/2012, zero should be append before day and month while its displaying not like 1/1/2012.....
i have tried

myDate=Format(myDate, "#0")

And

myDate= Format(myDate, "dd/mm/yyyy")

Use the built in functions of the Date type.

Date.ToShortDateString
Date.ToLongDateString

' in your case
myDate.ToShortDateString

You can also use the format function to write out your own.

Date.ToString("dd/mm/yyyy")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.