Convert email sent time 12 hr format

I’m converting eml to mht using aspose email using the below code
Aspose.Email.MailMessage message = Aspose.Email.MailMessage.Load(fileName);
MhtSaveOptions options = SaveOptions.DefaultMhtml;
options.FormatTemplates[“PageHeader”] = “”;
message.Save(@“C:\eml files\Eml source\Output” + Path.GetFileNameWithoutExtension(fileName) + “.mht”, options);

need to convert sent time to 12 hr formatfiles.zip (6.8 KB)

Hello @gmurugesan,

Please try to use the following:

mhtOptions.FormatTemplates[MhtTemplateName.DateTime] = "ddd dd MMM yyyy hh:mm:ss";

You can refer to the doc: Custom date and time format strings - .NET | Microsoft Learn

Thank you.

thanks for the reply.
but when i use
mhtOptions.FormatTemplates[MhtTemplateName.DateTime] = “ddd dd MMM yyyy hh:mm:ss”;
that gives wrong outputOutput.zip (6.8 KB)

@gmurugesan,

Please clarify what output you are expecting?
You can customize your sent date-time output using the custom date and time format strings.
Thanks.