DateTime字段类型对应的时间格式是 yyyy-MM-dd HH:mm:ss.fff ,3个f,精确到1毫秒(ms)。DateTime2字段类型对应的时间格式是 yyyy-MM-dd HH:mm:ss.fffffff ,7个f,精确到0.1微秒(μs),
如果用SQL的日期函数进行赋值,Dat...
分类:
数据库 时间:
2014-12-03 18:39:45
阅读次数:
236
//查看系统当前时间 HH24 24小时制 MI是正确的分钟select to_char(sysdate,'yyyy-mm-dd HH24:MI:SS') from dual//HH非24 mm不区分大小写 日期中MM系统认为是月份select to_char(sysdate,'yyyy-mm-.....
分类:
数据库 时间:
2014-12-03 14:01:10
阅读次数:
179
以一个例子作为直观感受:
如下,把一个字符串截取后,加上换行,显示在界面上
test
var str = 'aaa.bbb.ccc';
var ss = str.split('.');
var show = '';
for(var i=0;i<ss.length;i++){
show += ss[i]+'';
}
documen...
分类:
编程语言 时间:
2014-12-02 19:16:07
阅读次数:
314
用法: SimpleDateFormat sdf = new SimpleDateFormat( " yyyy-MM-dd HH:mm:ss " );这一行最重要,它确立了转换的格式,yyyy是完整的公元年,MM是月份,dd是日期,至于HH:mm:ss就不需要我再解释了吧!PS:为什么有的格式大写,...
分类:
移动开发 时间:
2014-12-02 19:06:26
阅读次数:
295
NSDateFormatter *date=[[NSDateFormatter alloc] init]; [date setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSCalendar *cal=[NSCalendar currentCalendar];...
分类:
移动开发 时间:
2014-12-02 17:07:38
阅读次数:
154
//计算上报时间差
????????NSDateFormatter?*formatter?=?[[NSDateFormatter?alloc]?init];
????????[formatter?setDateFormat:@"YYYY-MM-dd?HH:mm:ss"];//设置你想要的格式,hh与HH的区别...
分类:
移动开发 时间:
2014-12-02 16:45:10
阅读次数:
186
public class MyDate {
public static String getDateCN() {
SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
String date = format.format(new Date(System.currentTimeMillis()))...
分类:
编程语言 时间:
2014-12-02 16:36:46
阅读次数:
178
round() 遵循四舍五入把原值转化为指定小数位数,如:round(1.45,0) = 1;round(1.55,0)=2floor()向下取整 如:floor(1.45)= 1,floor(1.55) = 1 ,floor(-1.45)= -2 ,floor(-1.55) = -2ceiling...
分类:
数据库 时间:
2014-12-02 14:44:03
阅读次数:
229
// @DateTimeFormat(pattern="yyyy-MM-dd kk:mm:ss")
//@JsonSerialize(using=JsonDateSerializer.class)
//@Temporal(value = TemporalType.TIMESTAMP)
// @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss"...
分类:
其他好文 时间:
2014-12-02 10:38:56
阅读次数:
245
1:本章实例中,compare(const T &a,const T &b),在调用实例compare(“s”,”ss”)时编译出错,这是因为字面值”s”,”ss”的类型不一样,char * 的长度不一致导致;而如果是使用compare(const T a, const T b),则编译通过,因为这...
分类:
其他好文 时间:
2014-12-01 20:37:48
阅读次数:
155