Click here to Skip to main content
15,902,492 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
%f is directive for microsecond. But my time stamp is 2020-05-18 13:25:55.683

What I have tried:

purchased, sold, timestamp = np.loadtxt("BalanceData.txt", delimiter="|", unpack=True,
                                         converters={2: mdates.datestr2num('%Y-%M-%D %H:%M:%S.%f')})
Posted
Updated 24-Mar-20 2:43am
Comments
Richard MacCutchan 24-Mar-20 8:40am    
Python time values do not use milliseconds. You can get the number of microseconds and divided by 10 if you really need it.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900