Hi All,
I have created a subroutine to convert a bunch of text date/timestamps into a correctly formatted excel time. For some reason, it doesn't seem to want to work with certain times, but works fine with others. It seems to be something to do with the length of the whole string, but no amount of tweaking seems to fix it. It seems to be doing most of the function, but not the final 'TimeValue' part.
The code is:
9/18/2017 1:00:00 PM returns 1:00:00 PM (as text)
9/18/2017 10:10:00 AM returns 0.42361 (as I would like it to do)
Hope someone can help!
Thanks,
Mark
EDIT: Solved it myself - needed to change the cell format from text to general beforehand.
Bookmarks