Replies: 1 comment
-
Your milage may vary, but for what it's worth, this is number helper we created to solve a similar problem with importing dates from Excel and saving them as Carbon dates: /Custom number format that takes a date from Excel or a string with a long year or a short year and turns it into a carbon date/
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to import an excel file using the collection() method. One of the colums of this file contains a time interval string with the format H:MM:SS (e.g. "0:24:46"), but for some reasons I found out that the rows have two different formats for it:
When importing, I explode the cell value by the ":" character to know the number of hours, minutes and seconds.
The result is, that when a cell matches the the first case, the value is imported correctly. In the second case, the value is imported as double and I can't correctly handle it.
How can I detect and correctly parse the cells formatted as Time, so I can convert them to the same format as case 1?
Beta Was this translation helpful? Give feedback.
All reactions