CSV date format issue while showing the records

我是研究僧i 提交于 2019-12-13 21:03:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!