How in Python (3.4), how can I create a numeric date time representation? It will be used as a 'score' and ZRANGEBYSCORE* query on Redis?
More details: I'm using Redis and Python. I need to represent dates and time as numbers to allow me to query a Sorted Set. The set would be keyed on an ID. The score would be the numeric date time representation.
I've read this is possible using ZRANGEBYSCORE to get article IDs within a date range, but I'm unable to find any examples on how to create a numeric date time representation in Python that I can use as the score! Would you use something like an epoch?
2016-04-15T14:43:44.269Z, I need this to be a numeric representation somehow. This way, I could get all keys within a range etc @TigerhawkT3intorfloat), that's what timestamps are for. If you want to do calculations, it's much easier withdatetime, although that's a full object rather than a single number.