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 [30]: x= datetime64('2012-02-02 09:00:00', 's') In [31]: x Out[31]: numpy.datetime64('2012-02-02T09:00:00-0800') In [32]: x.astype('datetime64[D]').astype('datetime64[s]') Out[32]: numpy.datetime64('2012-02-01T16:00:00-0800') What's the simplest way to do this?
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion