roscoe
Well-known Member
- Joined
- Jun 4, 2002
- Messages
- 1,046
- Office Version
- 365
- Platform
- Windows
- MacOS
I have an array where I read in the contents of a file. One column of that array is a date ("yyyy/mm/dd") and another is a time ("hh:mm:ss"). I need to take the first and last time and calculate the difference by subtracting. I'm getting an error, I suspect because they are stored as strings and not numbers. I'm also concerned that if the two events happen across midnight the answer will be wrong, so I think I need to add the date value to the time value before subtracting. This would also require them to to be values.
Q: How do I convert these strings to proper date and time values? Or, how do I read them into my array in as serial numbers to begin with? The array was defined as "Variant" if that makers a difference...
Q: How do I convert these strings to proper date and time values? Or, how do I read them into my array in as serial numbers to begin with? The array was defined as "Variant" if that makers a difference...