public
Created

Pycassa DateTimeString Replacement

  • Download Gist
example.py
Python
1 2 3 4 5
class DatetimeStingType(pycassa.types.CassandraType):
 
def __init__(self):
self.pack = lambda dtime: dtime.strftime('%Y-%m-%d')
self.unpack = lambda dtime_str: datetime.strptime('%Y-%m-%d')

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.