问题
In my application, user select in which format they want the report. They enter one number which is format like 2000-1-4 and then they select CSV format and the data according to this number gets populated in that CSV.
Now the problem is when they enter this number which can be a date like 2012-1-4 then in CSV this number gets converted into 1/4/2012 which is wrong but when they give number like 883-17-8 then its coming as it is which is fine.
Is there any way i can resolve this? Someone please help me on this.
回答1:
How the value is displayed depends on regional settings of operating system. (E.g. for windows 7 see Region and Language). In additional seetings there is also spcified CSV separator (List separator), etc..
来源:https://stackoverflow.com/questions/15522027/csv-date-format-issue-while-showing-the-records