易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle中的to_date,sql server 2005对应的方法是什么


to_date('" + ldt_scene_start_time + "','yyyy-mm-dd hh24:mi:ss')
convert

可以直接用字符,注意引号

SQL code:
convert(varchar(19),时间字段,120)


SQL code:

SQL Server中文版日期字串转换
SQL Server中文版的预设的日期字串datetime格式是yyyy-mm-dd hh:mm:ss.mmm
例如:
select getdate()
2004-09-12 11:06:08.177
select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')
20040912110608
select CONVERT(varchar(12) , getdate(), 111 )
2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )
20040912
select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12
select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004
select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004
select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004
select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004
select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004
select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004
select CONVERT(varchar(12) , getdate(), 108 )
11:06:08
select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1
select CONVERT(varchar(12) , getdate(), 110 )


相关问答:

SQL语句效率问题 - 其他数据库开发 / 其他数据库

大家帮忙看看这2个sql语句哪个查询的速度更快点。谢谢帮忙。比较着急。在做性能测试。
select * from
  表A LEFT OUTER JOIN 表B ON (表A.id || ' ' =表B.id) ,表C , 表D, 表E
Where其他条件
select * ......

求助ORACLE批量清除表数据的问题 - Oracle / 开发

比如我有testA、testB、testC三个表
我现在需要写一个批处理或者脚本给别人 作用就是执行这段语句可以清除这三个表里面的数据 就是一个初始化的意思
哪位高人帮助下啊 一个数据库小白在此求救啦
SQL code:
......

急问一个oracle字段设置的问题 - Oracle / 基础和管理

各大老师好,请教一个问题.
我设置了一个oracle字段,varchar(3000),然后插入一条数据长度才1000,就报错了.如:net.sf.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update
Caused ......

是oracle的bug么?散分了! - Oracle / 基础和管理

本来要写个update语句
update table_a A
  set A.flag=1
  where A.id in (select B.id from table_b B)
结果误写成
update table_a A
  set A.flag=1
  where ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号