Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date format? #33

Closed
DanteNahuel opened this issue Oct 12, 2018 · 5 comments
Closed

Date format? #33

DanteNahuel opened this issue Oct 12, 2018 · 5 comments

Comments

@DanteNahuel
Copy link

When the worksheet is readed, the cells formated as complete Dates return an odd number (43115.47584490741 e.g) and are of String type.
How do I convert these into dates?

@ivcubr
Copy link

ivcubr commented Oct 26, 2018

@DanteNahuel What is the format of the cell you are trying to read?

Can you post a sample Excel document and your code that is reading that cell?

@linkosoft
Copy link

I'm having the same problem

var worksheet1 = fastExcel.Read(1);
FastExcel.CellRange cellRange = new FastExcel.CellRange("A", "BB");
var cells = worksheet1.GetCellsInRange(cellRange);
var cellValue= cells.FirstOrDefault(x => x.RowNumber == 1 && x.ColumnNumber == 1).Value;
var date = Convert.ToDateTime(cellValue);

@skycloudnest
Copy link

same problem

@rstm-sf
Copy link
Contributor

rstm-sf commented Dec 4, 2019

This SO may help you. I think that additional processing should be added to this library.

This was referenced Dec 10, 2020
@ahmedwalid05
Copy link
Owner

Opened a new issue for this #58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants