C#Winfrom数据库读取日期(年月日格式转换)

C#Winfrom数据库读取日期(年月日格式转换)

显示类型:2018-6-1

//说明:data_time.Text 控件名文本值 ;dataset.Tables[0].Rows[0]["art_time"]  数据集.表名.[行标][列标]

data_time.Text = Convert.ToDateTime(thisDS.Tables[0].Rows[0]["art_time"]).ToShortDateString();

显示类型:2018年6月1

data_time.Text = Convert.ToDateTime(thisDS.Tables[0].Rows[0]["art_time"]).ToLongDateString();

 

posted on 2018-06-03 16:34 爱奔跑的孩子 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/hzpeng/p/9129576.html

你可能感兴趣的:(C#Winfrom数据库读取日期(年月日格式转换))