Closed jiahao closed 10 years ago
OK, I added the ability to have "starting transition" characters and some tests. For now the characters used in the format string have to match what is later given in the date string, but I kind like the idea of using '?' as a wild card character of sorts.
On current master, I still get:
julia> Dates.DateTime("[14:51:00.118]", "[HH:MM:SS.sss]")
0001-01-01T14:51:00.118
julia> Dates.parse("[14:51:00.118]", Date("[HH:MM:SS.sss]"))
ERROR: ArgumentError("Delimiter mismatch. Couldn't find first delimiter, \"-\", in date string")
in parse at /home/jiahao/.julia/v0.3/Dates/src/io.jl:112
in Date at /home/jiahao/.julia/v0.3/Dates/src/io.jl:153
You need to use DateFormat
instead of Date
for the 2nd argument.
Thanks, that solved the issue for me
I have some strings to parse which look like
"[14:51:00.118]"
which are hours, minutes and seconds. I'm having trouble figuring out what to pass toDateFormat
to parse this string: