string to time conversion (when string contains time but no date)

Timothee Cour via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jun 26 20:17:39 PDT 2015


is there a way to convert a string representing a time (without date) to a
time, eg:

auto t = "19:03:40.143656";
auto a=SysTime.fromTimeString(t); // doesn't exist


My current workaround is to append a dummy date before and then
calling SysTime.fromSimpleString.

Is there a better way? seems needed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150626/95208228/attachment.html>


More information about the Digitalmars-d-learn mailing list