?
=?iso-8859-1?q?H=E5vard_Olerud_Eriksen?=
I've got a small app which reads dates from an Excel spreadsheet adding
them onto a listview. The problem is that the dates are read in as ints
(or possibly doubles, they look like ints). So for instance the date
03.07.2000 is represented like 36710, 04.07.2000 as 36711 etc. The
problem as you may understand is that I want them to be stored as dates
(or ideally as strings). I've tried all sorts of Convert.* functions
and casts but they all end up throwing exceptions.
The column is read like this:
Excel.Range range = worksheet.get_Range("A"+i.ToString(),
"A"+i.ToString()); and currently the list view is populated like this:
listView1.Items.Add(new ListViewItem(range.Cells.Value2.ToString()));
Does anyone have any hints, tips, code snippets or otherwise which can
help me solve my problem?
MTIA,
Håvard
them onto a listview. The problem is that the dates are read in as ints
(or possibly doubles, they look like ints). So for instance the date
03.07.2000 is represented like 36710, 04.07.2000 as 36711 etc. The
problem as you may understand is that I want them to be stored as dates
(or ideally as strings). I've tried all sorts of Convert.* functions
and casts but they all end up throwing exceptions.
The column is read like this:
Excel.Range range = worksheet.get_Range("A"+i.ToString(),
"A"+i.ToString()); and currently the list view is populated like this:
listView1.Items.Add(new ListViewItem(range.Cells.Value2.ToString()));
Does anyone have any hints, tips, code snippets or otherwise which can
help me solve my problem?
MTIA,
Håvard