spark-excel icon indicating copy to clipboard operation
spark-excel copied to clipboard

Can not parse Date

Open Kyofin opened this issue 4 years ago • 5 comments

My Execl is below: image

when I use spark-excel to read , the data is wrong.

df.show

+-----------------+
|         入住日期|
+-----------------+
|       3"月"3"日"|
|       3"月"7"日"|
|reserved-43901x1C|
|reserved-43905x1C|
|      3"月"10"日"|
|      3"月"10"日"|

Kyofin avatar Dec 03 '20 14:12 Kyofin

The other cells in that column don't look like dates, do they? You can only use the same kind of cell in one column.

nightscape avatar Dec 03 '20 22:12 nightscape

@nightscape : The issue seems to be because there is no dateParser unlike timeStampparser . What I propose is add another parameter option "dateParser" and use the corresponding format given there to convert to Date Type .

Harivignesh3419 avatar Jan 01 '21 01:01 Harivignesh3419

@Harivignesh3419 sounds good! Do you want to give it a try?

nightscape avatar Jan 01 '21 13:01 nightscape

Sure @nightscape ! I will give an try . I see two branches master and main branch .Which branch should i start working with and give PR?

Harivignesh3419 avatar Jan 01 '21 21:01 Harivignesh3419

main is the new default branch. For some reason I can't delete master...

nightscape avatar Jan 01 '21 22:01 nightscape