I have a time that is 16:23:01. I tried using DateTime.ParseExact
, but it\'s not working.
Here is my code:
string Time = \"16:23:01\";
Date
The accepted solution doesn't cover edge cases. I found the way to do this with 4KB script. Handle your input and convert a data.
Examples:
00:00:00 -> 00:00:00
12:01 -> 12:01:00
12 -> 12:00:00
25 -> 00:00:00
12:60:60 -> 12:00:00
1dg46 -> 14:06
You got the idea... Check it https://github.com/alekspetrov/time-input-js