Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting a date

Status
Not open for further replies.

kss444

Programmer
Sep 19, 2006
306
US
I have a calendar control on my page and in my codebehind page I want to format the date in the calendar control to "yyyy-MM-dd hh:mm".

This is what I have but does not seem to work
Dim sDate1 As DateTime
sDate1 = Format(calStartDate.SelectedDate, "yyyy-MM-dd hh:mm")

What returns is #12/3/2008 12:00:00 PM# (if the user selected this date)

Thanks with the help,
K
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top