use sscanf to extract info from a timestamp string. Now it supports 'YYY...

...Y-MM-DD' format. add a simple test case
You have no range check on micros -- you should not be allowing "2000-01-01 00:00:00.-12345". Fix and validate with a test.