|131968||Aug 5,2017 07:10 PM||Aug 8,2017 09:29 AM||ASP.NET Core||5|
On re-reading, let me summarize. When I attach a "-" (or any other characters) to the formatted date string, all goes well.
When I remove the "-", so use just the formatted date string, I get a corrupted document.
Off course I don't want the "-" in front of my dates. What should I do?
Thanks for that!
I am using asp.net core rather than MVC, and ported your sample in to it. It works okay as in your sample, but it shows the behavior when I change the dates to this:
data = "22-5-2017";
data = "6-2-2017";
data = "30-7-2017";
These are standard dates in Netherlands locale.
I can send you my sample, but I assume if you change the dates in your sample it shows the same.
Some more info found: it depends on the date format of your PC (after restarting the web application in VS.
a) As long as the dates are in line with the date format on the system the document is generated
b) with Dutch-Netherlands dates and English US date format and with Us dates with Dutch-Netherlands date format, the document can't be opened.
c) when the document works the dates are changed to a date in year 2134.
I also changed the input dates to DateTime variables, but this generates the same futuristic output.
Attached my asp.net core sample
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.