Cody

# Problem 43611. microseconds passed today

Solution 1122164

Submitted on 13 Feb 2017 by Jihye Sofia Seo
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = '24-Oct-2016 20:26:28'; y_correct = '73588000000'; assert(isequal(microsecondsPassedToday(x),y_correct))

now = datetime 24-10-2016 20:26:28 start = datetime 24-10-2016 20:26:28 start = datetime 24-10-2016 00:26:28 start = datetime 24-10-2016 00:00:28 start = datetime 24-10-2016 00:00:00 duration = 73588000000

2   Pass
x = '24-Oct-2016 20:29:48'; y_correct = '73788000000'; assert(isequal(microsecondsPassedToday(x),y_correct))

now = datetime 24-10-2016 20:29:48 start = datetime 24-10-2016 20:29:48 start = datetime 24-10-2016 00:29:48 start = datetime 24-10-2016 00:00:48 start = datetime 24-10-2016 00:00:00 duration = 73788000000

3   Pass
x = '14-Feb-2002 08:19:04'; y_correct = '29944000000'; assert(isequal(microsecondsPassedToday(x),y_correct))

now = datetime 14-02-2002 08:19:04 start = datetime 14-02-2002 08:19:04 start = datetime 14-02-2002 00:19:04 start = datetime 14-02-2002 00:00:04 start = datetime 14-02-2002 00:00:00 duration = 29944000000

4   Pass
x = '07-Apr-1902 10:00:00'; y_correct = '36000000000'; assert(isequal(microsecondsPassedToday(x),y_correct))

now = datetime 07-04-1902 10:00:00 start = datetime 07-04-1902 10:00:00 start = datetime 07-04-1902 00:00:00 start = datetime 07-04-1902 00:00:00 start = datetime 07-04-1902 00:00:00 duration = 36000000000

5   Pass
x = '11-Nov-1911 11:11:11'; y_correct = '40271000000'; assert(isequal(microsecondsPassedToday(x),y_correct))

now = datetime 11-11-1911 11:11:11 start = datetime 11-11-1911 11:11:11 start = datetime 11-11-1911 00:11:11 start = datetime 11-11-1911 00:00:11 start = datetime 11-11-1911 00:00:00 duration = 40271000000