如何将Datetimepicker
-Format设置为MM/YYYY?
最佳答案
使用DateTimerPicker.Format
属性。检查MSDN
public void SetMyCustomFormat()
{
// Set the Format type and the CustomFormat string.
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "MM/yyyy";
}
关于c# - 如何将Datetimepicker设置为“仅月份和年份”格式?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10137022/