在oracle中插入时转换DateFormat [英] Conversion OF DateFormat while inserting in oracle

查看:100
本文介绍了在oracle中插入时转换DateFormat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

string Today = Convert.ToDateTime(ToDa).ToString(dd-MMM-yyyy);



我收到了这个

18-dic-2014



我需要在2014年12月18日之前付款



什么是问题



与完整日期和时间(长)一样

,如DateTime.Now.ToString(F)



我现在正在外卖

18-dicembre-2014



那么如何将最终输出设为18-dec-2014

string Today = Convert.ToDateTime(ToDa).ToString("dd-MMM-yyyy");

I am getting this Out
18-dic-2014

I am need out put as 18-dec-2014

what is the Issue

As in Full date and time (long)
as in DateTime.Now.ToString("F")

I am getting the out put as
18-dicembre-2014

So how to get the Final output as 18-dec-2014

推荐答案

使用InvariantCulture [ ^ ]

use InvariantCulture[^]
string Today = Convert.ToDateTime(ToDa).ToString("dd-MMM-yyyy", CultureInfo.InvariantCulture);


这篇关于在oracle中插入时转换DateFormat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆