1. 当前系统日期、时间select getdate()2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值例如:向日期加上2天select dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.0003. dat...
分类:
数据库 时间:
2015-07-08 14:37:20
阅读次数:
186
1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 ...
Console.WriteLine("请输入闹钟的日期时间"); DateTime s = Convert.ToDateTime(Console.ReadLine()); while (true) { ...
分类:
其他好文 时间:
2015-07-07 22:30:30
阅读次数:
157
List<int> listYears = new List<int>();
for (int i = 5; i > -5; i--)
{
listYears.Add(DateTime.Now.Year - i);
}
cb_Year.ItemsSource = listYears;
cb_Year.SelectedValue = DateTime.Now.Year ;
/*Select...
to_date("要转换的字符串","转换的格式") 两个参数的格式必须匹配,否则会报错。即按照第二个参数的格式解释第一个参数。to_char(日期,"转换格式" ) 即把给定的日期按照“转换格式”转换。转换的格式:表示year的:y 表示年的最后一位 yy 表示年的最后2位 yyy 表示年的最后3...
分类:
数据库 时间:
2015-07-07 18:53:54
阅读次数:
210
精简的美丽/* * Sql脚本压缩类。 * 去掉sql语句中多余的空格,以减少sql脚本的文本长度 * * Author : goldli@163.com * DateTime : 2015/07/03 */using System.Text.RegularExpressions;namesp...
分类:
数据库 时间:
2015-07-07 16:43:57
阅读次数:
143
读取csv文件:import csv#打开文件,用with打开可以不用去特意关闭file了,python3不支持file()打开文件,只能用open()with open("XXX.csv","r",encoding="utf-8") as csvfile: #读取csv文件,返回的是迭代类...
分类:
编程语言 时间:
2015-07-07 12:24:13
阅读次数:
186
MySQL的Data_ADD函数与日期格式化函数说明DATE_ADD(date,INTERVALexprtype) DATE_SUB(date,INTERVALexprtype)这些函数执行日期运算。date是一个 DATETIME 或DATE值,用来指定起始时间。expr是一个表达式,用来指定从起...
分类:
数据库 时间:
2015-07-07 11:00:49
阅读次数:
358
//2008年4月24日 System.DateTime.Now.ToString("D"); //2008-4-24 System.DateTime.Now.ToString("d"); //2008年4月24日 16:30:15 System.DateTime.Now.ToString("F")...
不要直接对Request.Headers["If-Modified-Since"]使用Convert.ToDateTime前一段时间图片处理服务一直报“System.FormatException: 该字符串未被识别为有效的 DateTime”。查了几天,没什么效果,昨天夜里写了日志记录,终于发现问...
分类:
其他好文 时间:
2015-07-07 10:47:24
阅读次数:
82