在.net中Oracle日期类型的处理
来源:互联网 发布:网络传销举报电话 编辑:程序博客网 时间:2024/04/29 22:18
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
publicstringrqcl(stringrqz)
{
CultureInfoci=newCultureInfo("de-DE");
stringsz=System.Convert.ToDateTime(rqz).ToShortDateString();
DateTimedt=System.Convert.ToDateTime(sz);
stringrq=dt.ToString("d",ci).Insert(5,"月");
if(dt.Month>9)
{
}
else
{
rq=rq.Substring(0,3)+rq.Substring(4,rq.Length-4);
}
return(rq);
}
需要引用usingSystem.Globalization;<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
.Iru562{display:none;} 刚接触Oracle数据库,发现Oracle中的日期类型很难处理,必须为如11-11月-2004,而且必须是汉字月,不知是什么原因,从数据库里读出来再更新日期不变的情况下也不能更新了,真是麻烦,还得转换类型,在网上查了很多帖子,也没有找到好的解决办法,看msdn找到一个类CultureInfo,就写了一个方法转换日期类型.publicstringrqcl(stringrqz)
{
CultureInfoci=newCultureInfo("de-DE");
stringsz=System.Convert.ToDateTime(rqz).ToShortDateString();
DateTimedt=System.Convert.ToDateTime(sz);
stringrq=dt.ToString("d",ci).Insert(5,"月");
if(dt.Month>9)
{
}
else
{
rq=rq.Substring(0,3)+rq.Substring(4,rq.Length-4);
}
return(rq);
}
需要引用usingSystem.Globalization;
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- [转]在.net中Oracle日期类型的处理
- 在.net中Oracle日期类型的处理
- 在Oracle中插入日期类型的数据
- JDBC 对 oracle 日期类型的处理
- oracle日期格式总结在oracle中处理日期大全
- oracle日期格式总结在oracle中处理日期大全
- oracle日期格式总结在oracle中处理日期大全
- 在 Oracle 中处理日期大全
- 在Oracle中实现各种日期处理
- 在oracle中处理日期大全
- 在Oracle中实现各种日期处理
- 在oracle中处理日期大全
- 在Oracle中实现各种日期处理
- 在oracle中处理日期大全
- 在oracle sql 中处理日期大全
- 在oracle中处理日期大全
- DBUtils 处理Oracle 日期类型
- oracle中时间日期的处理
- 初学入门 PHP 和 MySQL
- ASP.Net的6大焦点问题
- 长沙发上的对话(四)
- 十天学会ASP.net之第十天
- 长沙发上的对话(三)
- 在.net中Oracle日期类型的处理
- 长沙发上的对话(二)
- 长沙发上的对话(一)
- 十天学会ASP.net之第九天
- PHP中类的理解和应用[二]
- 十天学会ASP.net之第七天
- PHP中类的理解和应用[一]
- 十天学会ASP.net之第八天
- PHP入门速成