"simon" <si*********@stud-moderna.si> wrote in message
news:uC**************@TK2MSFTNGP10.phx.gbl...
I would like to get the string in this format: yyyyddmm , like in sql.
SQL does not have a date format.
It can apply formatting to values as they are returned to you but,
internally, the database can store the data any way it darn well
pleases (and it'll be nothing like anything you or I can make sense
of).
I read the date from the calendarControl:
dateString=Calendar.SelectedDate.Date.ToShortDateS tring
and I get dateString=4.12.2003
which is exactly what you asked for.
If you want a /specific/ format, then format the Date the way
you want it to be, as in
dateString = Calendar.SelectedDate.Date.ToString( "ddMMyyyy" )
Bear in mind that VB will have a Devil of time trying to turn this
eight-digit number back into a Date, if you ever ask it to...
HTH,
Phill W.