在oracle数据库中,保存时间用何种类型字段?一定要用date型吗? 也可以用用char,但约束不好写,得让前台判断,保证存入的字符串确实能代表一个小时分钟秒的数据最好用date 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用date判断时间的前后(在sql中用>,<)能正常使用吗? date使用> <时,要注意些,最好转换成字符,因为date带有时间,查询可能会不精确. 在c#中如何定制格式?就是如何用format函数(在c#.net中)?在vb中有,但在c#.net中还没有呀? 要parse还是ToString?string strMyDateTime = "2/16/1992 12:15:12";// myDateTime gets Feburary 16, 1992, 12 hours, 15 min and 12 sec.System.DateTime myDateTime = System.DateTime.Parse(strMyDateTime);System.DateTime dTime = new System.DateTime(2001, 5, 16, 3, 2, 15);// If the current culture is "us-EN",// longDateString gets "Wednesday, May 16, 2001"string longDateString = dTime.ToLongDateString(); 还有一个问题:如何对ip地址段的查询?因为ip地址段,如果保存为字符串,比较大小时,也有格式的问题,如192.168.12.8 与 192.168.2.18如何来进行比较?是不是也要转换为固定格式的字符串? Oracle连接Ora-12547:TNS:丢失连接 请教下动态游标的问题 关于group by 如何在大数据量下最有效率的修改某一字段 查询消耗I/O资源的sql 急!!! 新手,请问一些数据库优化方面的问题 在oracle 8.1.7中数据被删除了,如何恢复? like问题,谢谢 装了oracle数据用PLSQL连接提示没正确安装客户端 alter table table1 cache有啥用啊? 关于ORACLE导致系统挂起的问题!!!
string strMyDateTime = "2/16/1992 12:15:12";
// myDateTime gets Feburary 16, 1992, 12 hours, 15 min and 12 sec.
System.DateTime myDateTime = System.DateTime.Parse(strMyDateTime);System.DateTime dTime = new System.DateTime(2001, 5, 16, 3, 2, 15);
// If the current culture is "us-EN",
// longDateString gets "Wednesday, May 16, 2001"
string longDateString = dTime.ToLongDateString();