我有以下代码行。字符串类型的日期格式为29/11/2017。我想要它作为November 29, 2017. 我尝试添加 String.Format 但它在 pdf 中显示相同的 29/11/2017 。
cellValDate.AddElement(new Phrase(String.Format("{0:dddd, MMMM d, yyyy}",
txtDate.Text, CultureInfo.CreateSpecificCulture("en-US")),
new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.HELVETICA,
10, iTextSharp.text.Font.NORMAL)));
Run Code Online (Sandbox Code Playgroud) c# ×1