When i save a message to html it showing date in 24 hr format how to make it 12 hr Format.
I can save message for 12 hr Format for Public Folder and Sahred Folder .It is working fine but same code not working for PST Format.
My Code
objectName = txtPstFldr + “\message” + “" + fileName + "” + Now.Ticks.ToString + “.html”
Dim options As HtmlSaveOptions = SaveOptions.DefaultHtml
options.ResourceRenderingMode = True
options.HtmlFormatOptions = HtmlFormatOptions.WriteHeader Or HtmlFormatOptions.WriteCompleteEmailAddress
msg.TimeZoneOffset = New TimeSpan(-5, 0, 0)
msg.Date = msg.Date.ToLocalTime
msg.Save(objectName, options)
I am afraid what you are trying to achieve is not possible using Aspose.Email API for exported HTML. However, if you are exporting for MHT then you set this on your end.
i am trying the same but it is not showing in 12 hr format. objectName = txtEmlFldr + “\message” + “" + fileName + "” + Now.Ticks.ToString + “.html”
Dim options As HtmlSaveOptions = SaveOptions.DefaultHtml
options.ResourceRenderingMode = True
options.HtmlFormatOptions = HtmlFormatOptions.WriteHeader Or HtmlFormatOptions.WriteCompleteEmailAddress Or HtmlFormatOptions.DisplayAsOutlook
msg.TimeZoneOffset = New TimeSpan(-5, 0, 0)
msg.Date = msg.Date.ToString(“MM/dd/yy hh:mm:ss tt”)
msg.Save(objectName, options)
successfulTblRow.Item(“File format”) = “html”
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.