extjs 日期格式化详解
来源:互联网 发布:跟泰国人妖ml 知乎 编辑:程序博客网 时间:2024/04/30 02:18
Format Output Description
------ ---------- --------------------------------------------------------------
d 10 Day of the month, 2 digits with leading zeros
D Wed A textual representation of a day, three letters
j 10 Day of the month without leading zeros
l Wednesday A full textual representation of the day of the week
S th English ordinal day of month suffix, 2 chars (use with j)
w 3 Numeric representation of the day of the week
z 9 The julian date, or day of the year (0-365)
W 01 ISO-8601 2-digit week number of year, weeks starting on Monday (00-52)
F January A full textual representation of the month
m 01 Numeric representation of a month, with leading zeros
M Jan Month name abbreviation, three letters
n 1 Numeric representation of a month, without leading zeros
t 31 Number of days in the given month
L 0 Whether it's a leap year (1 if it is a leap year, else 0)
Y 2007 A full numeric representation of a year, 4 digits
y 07 A two digit representation of a year
a pm Lowercase Ante meridiem and Post meridiem
A PM Uppercase Ante meridiem and Post meridiem
g 3 12-hour format of an hour without leading zeros
G 15 24-hour format of an hour without leading zeros
h 03 12-hour format of an hour with leading zeros
H 15 24-hour format of an hour with leading zeros
i 05 Minutes with leading zeros
s 01 Seconds, with leading zeros
O -0600 Difference to Greenwich time (GMT) in hours
T CST Timezone setting of the machine running the code
Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east)
如:当前时间精确到秒var date = new Date().dateFormat('Y-m-d H:i:s');
保要获取到xtype:"datefield",的值后,把获取到的值.dateFormat('Y-m-d H:i:s'); 像这样就能插入数据库了。
例如:alert(clientInfoEditForm.findById("intDateChange1").getValue().dateFormat("Y-m-d H:i:s"));
Ext.onReady(function() {
var v1 = "welcome to zhongtian !";
var win = new Ext.Window({
title:"用户基本信息",
width:400,
height:260,
layout:"form",
xtype:"form",
//默认左对齐
//labelAlign:"right",
labelWidth:60,
items:[
{xtype:"hidden",name:"id"},
{
xtype:"datefield",
fieldLabel:"出生日期",
name:"birthday",
fomat:"Y-m-d"
}
]
})
win.show();
})
- extjs 日期格式化详解
- AngularJS 日期格式化详解
- 日期格式化详解
- Extjs怎么格式化Grid的日期列
- extjs 日期格式化参数对应关系
- sql:date_format日期格式化详解
- mysql中格式化日期详解
- ExtJs中日期的格式化处理(获取数据库日期)
- extjs显示格式化返回JSON格式的日期
- 详解Java日期格式化及其使用例子
- 详解Java日期格式化及其使用例子
- 日期格式化
- 日期格式化
- 格式化日期
- 格式化日期
- 日期格式化
- 日期格式化
- 日期格式化
- Performance
- [技术分享– RMS 篇] 安装 ADRMS 无法注册服务连接点的解决方法
- 程序猿赵欢喜工作一年的小体会
- 什么是ERP
- 第一部分:基础知识(第一章)一个XNA 手机程序(续)
- extjs 日期格式化详解
- 获取屏幕分辨率
- 变异算法之删除(remove, remove_if, remove_copy, remove_copy)
- JAVA设计模式之抽象工厂(Abstract Factory)模式
- Effective C++ 读后感
- javascript不支持二维数组怎么解决
- C/C++/Perl/汇编/Java效率比较---读后感
- linux 文件编码识别
- Winform 控制同一窗体只能打开一次的方法!