DateTime yesterday = 2002-06-16 12:00;
DateTime today = Convert.ToInt32(yesterday.Date) + 1 //172.Compare 能比较两个值的大小,并且返回相差多少
DateTime today = Convert.ToInt32(yesterday.Date) + 1 //172.Compare 能比较两个值的大小,并且返回相差多少
解决方案 »
- c#新手 请教。Winform 中 notifyIcon 的问题
- 求一个自动开关机的程序
- c#SQL数据库导出数据到Excel,详细代码最好
- 关于dataGridView1_CellLeave 事件!
- 求一个截取一段字符串的方法
- 很难的问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 截取usb口打印机的打印数据重新打印
- 关于传递参数process.StartInfo.Arguments的问题?
- assembly的问题,高分求购(高手请进)
- C#socket程序中加入协议
- 两个页面之间的数据传输问题
- 请教:datagrid的排序、过滤问题
代码来了,再加20分。
二位,代码有请。
int year = yesterday.Year;
int month = yesterday.Month;
int day = yesterday.Day + 1;//在这里可能要对月份,年份的判断,不能单纯地加1,自己改写~~
DateTime today = new System.DateTime (year,month,day);
this.TextBox1.Text = today.Date.ToString();//2002-06-20 00:00:00
System.DateTime answer = today.AddDays(1).Date;