Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
itextsharpを使用してasp.netで時間のあるpdfファイルを作成するにはどうすればよいですか?短時間で例外が作成されるため、ファイル名にこのコードを使用しています
filename = "Invoice" + _InvoiceNumber + DateTime.Now.ToShortTimeString() + ".pdf";
このコードで変更する必要があるものPDFファイル名を次のようにします
Invoice06-7.00AM
返信を待つ
DateTime形式「dd-H.mmtt」を指定します
どこ
dd - Date H - Hours mm - Minutes tt - AM or PM
次のようなものを試してください:
filename = "Invoice" + _InvoiceNumber + DateTime.Now.ToString("dd-H.mmtt"); + ".pdf";