We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

LINQ Reporting Engine - date string is not showing as expected in template

I am using Aspose.words Linq syntax with Word template and Json data But the date string is not showing as expected in template.

  • If my string is “3-March-97” it’s showing 03-03-1997 00:00:00

My expected output should be to show the string as it is in the template that I passed in json string, It should not consider it as Date string and format it self


Please check the following quote from Accessing JSON Data:

In some scenarios, you may need to disable recognition of date-time values at all, for example, when you deal with strings containing already formatted date-time values, which you do not want to re-format using the engine. You can achieve this by setting the exact date-time parse formats to an empty list.

Here is a code snippet for this:

JsonDataLoadOptions options = new JsonDataLoadOptions();
options.ExactDateTimeParseFormats = new List<String>();
JsonDataSource dataSource = new JsonDataSource(..., options);