\*\fldinst DATE and TIME are inconsistent

From the documentation for UpdateFields and this Aspose forum support answer from 2012, I would assume that the expected behavior for Aspose Words is to display the contents of the \fldrslt control word unless UpdateFields is called.

In reality, doing {\*\fldinst date \\@ “M/d/yyyy” }{\fldrslt 12/24/2014}} will result in the current date, while doing {\field{\*\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}} will result in 8:12 AM being displayed.

This seems wrong, either they should both display the contents of \fldrslt (i.e., 12/24/2014 and 8:12 AM), or they should both run the function.

Link to documentation here, showing that the time function should be valid.

Attached file here, for reproduction on the Aspose Convert site.
testrtf.rtf.zip (644 Bytes)

Example RTF here that should display 12/24/20148:12AM but instead displays 6/29/20218:12AM:

{\field{\*\fldinst DATE \\@ “M/d/yyyy” }{\fldrslt 12/24/2014}}
{\field{\*\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}}


We have converted “testrtf.rtf” to again RTF file format by using the following code snippets and attached the output RTF files here for your reference:

Snippet 1:

Document doc = new Document("C:\\Temp\\testrtf.rtf");
doc.Save("C:\\temp\\open save.rtf");

Snippet 2:

Document doc = new Document("C:\\Temp\\testrtf.rtf");
doc.Save("C:\\temp\\open UpdateFields save.rtf");

Output RTF files produced by using the above C# codes of Aspose.Words for .NET 21.6:

Can you please elaborate with the help of comparison screenshots what are the exact issues in these Aspose.Words generated files? What editor are you using on your end to visualize these RTF files - MS Word, WordPad or which other application? It would be great if you please also list the complete steps that we can perform to observe the undesired behavior on our end. Thanks for your cooperation.

Ah sorry, I forgot to say that I was specifically talking about converting RTF to HTML. My apologies.

It would be great if you please also list the complete steps that we can perform to observe the undesired behavior on our end.

  1. Upload testrtf.rtf to the Aspose Convert site
  2. Convert to HTML
  3. Click download
  4. View the generated HTML file (I used TextEdit on a Macbook)
  5. See ““7/1/2021”8:12 AM” instead of ““12/24/2014”8:12 AM” or ““7/1/2021”6:18 PM”.

I would expect to see either 12/24/2014 and 8:12 AM, or 7/1/2021 and 6:18PM. Having one of each seems wrong.


We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-22448. We will further look into the details of this issue and will keep you updated here on the status of the linked ticket. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-22448) have been fixed in this Aspose.Words for .NET 21.8 update and this Aspose.Words for Java 21.8 update.