I have used the FileInfo.LastWriteTime to populate some cells in an Excel spreadsheet and that all appears to be working well. My problem is that I now need to get the totals by month and when I use something like =month(A1) and then copy it down to all the other cells, each and every on evaluates to 1. That's fine for the entries which are actually in January, but of course it all goes wrong when I hit the next month. I have tried using FileInfo.LastWriteTime.ToString with only the same results. So how would one actually extract the month information from the LastWriteTime function?
↧