0

I'm generating csv file in java using following string

108176,2019-09-16,11-15-2019

when open this file in notepad++ it shows as this format

enter image description here

but when I open it in excel it shows different format ( hyphen symbol change to slash ).

enter image description here

what was the error and how can I get hyphen instead of slash?

kgdc
  • 166
  • 4
  • 13
  • This is most probably the way your sheet displays dates (also note the different ordering of the month and day) . – Arnaud Sep 17 '19 at 12:20
  • yes but I want to it display as general or text format – kgdc Sep 17 '19 at 12:21
  • Not sure about a duplicate, but have a look at this : https://stackoverflow.com/questions/44029740/force-excel-to-open-csv-without-formatting?rq=1 – Arnaud Sep 17 '19 at 12:22
  • @Arnaud can I set date as general or Text format, I need to display date with hyphen – kgdc Sep 17 '19 at 12:23

0 Answers0