Right now I have been given the code below code to get the selected date from a calendar and displays it into a textbox but it's in dd/MM/yyyy format.
txtSMAlerted_PopupControlExtender.Commit(calSMAlerted.SelectedDate.ToShortDateString());
It is simply a format string passed to the ToString method of the DateTime
calSMAlerted.SelectedDate.ToString("ddd, dd/MM/yyyy");
The ToString(string) overload of DateTime accepts a Standard Date Format String as well as a Custom Date And Time Format String.
With this last set of rules it is easy to build your required output format.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments