BENatUSGS
06-13-2011, 10:42 AM
Hey all,
I’m having some issues with date and time in my code. I have values that are being stored in an array, p(k), and being moved to another workbook. When I attempt to combine date and time that initially look like this… 6/30/83 and 16:30… I am getting a result that looks like 6/30/19830.680555555555555.
Here is my code that attempts to move the time and dates…
Cells(1, 5).Value = p(3) + p(4)
p(3) being the stored date value and p(4) being the time.
Is there a different way that these values must be stored in order for them to be reformatted correctly?
Let me know,
Ben
I’m having some issues with date and time in my code. I have values that are being stored in an array, p(k), and being moved to another workbook. When I attempt to combine date and time that initially look like this… 6/30/83 and 16:30… I am getting a result that looks like 6/30/19830.680555555555555.
Here is my code that attempts to move the time and dates…
Cells(1, 5).Value = p(3) + p(4)
p(3) being the stored date value and p(4) being the time.
Is there a different way that these values must be stored in order for them to be reformatted correctly?
Let me know,
Ben