-4

Hi everyone I am new to VBA I have some ISO times (i.e: 2020-06-12T23:44:00.000+0000) that I extracted from JSON and put into column 21 and started with row 2 going down to row 51. I am trying to use this code:

=DATEVALUE(MID(A1,1,10))+TIMEVALUE(MID(A1,12,8))

To convert the ISO to a normal time but need some help on how to do this. Where exactly do I put this line? Do I enter that value in column 22 row 2? IF so, what do I do after I put that line of code there? Right now it's saying I have an error.

tony19
  • 125,647
  • 18
  • 229
  • 307

1 Answers1

2

I think you may be getting Excel VBA confused with Excel Formulas. Can you show more of your code?

If not, the formula you have works fine to convert an ISO timestamp to a numerical date in Excel (which you can then format as a date). All you need to do is paste the formula into the cell B1 (for example, assuming your series of ISO timestamps are in column A) and paste down.

enter image description here