[Numpy-discussion] just the date part of a datetime64[s]?
Wed Feb 8 11:10:37 CST 2012
Hello, is there a good way to get just the date part of a datetime64?
Frequently datetime datatypes have month(), date(), hour(), etc functions
that pull out part of the datetime, but I didn't see those mentioned in the
datetime64 docs. Casting to a 'D' dtype didn't work as I would have hoped:
In : x= datetime64('2012-02-02 09:00:00', 's')
In : x
In : x.astype('datetime64[D]').astype('datetime64[s]')
What's the simplest way to do this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion