TimePicker

private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            MessageBox.Show(this.dateTimePicker1.Value.ToString());//返回日期和时间2013/32/6 10:06
            MessageBox.Show(this.dateTimePicker1.Value.ToShortDateString());//返回日期2013/3/26
            MessageBox.Show(this.dateTimePicker1.Value.ToOADate().ToString());//用于日期的比较
        }

posted @ 2013-03-26 10:08  Predator  阅读(118)  评论(0编辑  收藏  举报