问题
I'm using Webdatechooser<<Infragistics control>>
for a column which takes the datetime.
I need to convert the value entered (through the Webdatechooser) to dd-mmm-format.
Can I have snippets for that?
回答1:
The value is a DateTime object so you can use the ToString function of that object to generate the desired output.
((DateTime)WebDateChooser1.Value).ToString("dd-MMM-yyyy");
Should do it.
来源:https://stackoverflow.com/questions/709982/how-can-i-convert-a-datetime-to-dd-mmm-yyyy-date-format