What is the correct format to extract date and time from timestamp?

sample = nusc.sample[0]
sample['timestamp']
Out[22]: 1532402927647951     
pd.to_datetime(sample['timestamp'])
Timestamp('1970-01-18 17:40:02.927647951')

This timestamp doesn’t seem right, how should I extract it correctly?

We store the timestamp in microseconds, Pandas seems to require nanoseconds:

pd.to_datetime(1532402927647951*1000)
Timestamp('2018-07-24 03:28:47.647951')
1 Like