本文介绍了如何转换“捷克语(捷克共和国)(cs-CZ)”我格式的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿,
早安先生,
如何在我的自定义格式中转换捷克(捷克共和国)(cs-CZ)日期
i试过但没有成功,也没有找到谷歌上的任何解决方案这个
请帮我解决这个问题。
Hey,
Good Morning Sir,
How to Convert "Czech (Czech Republic) (cs-CZ)" Date in my Custom Format
i tried but not success and also not found any solution on google related this
pls help me to solved this issue.
<asp:Label ID="Label1" runat="server" Text='<%# (Eval("InvoiceDate") != DBNull.Value ? string.Format("0:MMM dd, yyyy}",DateTime.ParseExact(Eval("InvoiceDate").ToString(), "d.M.yyyy", System.Globalization.CultureInfo.InvariantCulture)) : Eval("InvoiceDate")) %>'></asp:Label>--%>
推荐答案
Thread.CurrentThread.CurrentCulture = new CultureInfo("cz-CZ");
// Displays dt, formatted using the ShortDatePattern
// and the CurrentThread.CurrentCulture.
Console.WriteLine(dt.ToString("d"));
Link []。
这篇关于如何转换“捷克语(捷克共和国)(cs-CZ)”我格式的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!