Date-ing in python

CrashLaker
1 min readMay 5, 2019

--

Some quick cheat sheet on date performing date translations in python

Source: Tryfoto

Dealing with dates from different sources is always a nightmare specially when you’re dealing with date timestamps from a bunch of different sources and architectures.

This story is going to be quick as I’ll just show out some quick ways to convert your data to a proper format and time zones offsets.

  1. Datetime to timestamp

2. Timestamp to Datetime (no timezone)

3. Applying timezone to your datetime without converting it

4. The other way around

That’s all. Thank you!

--

--

CrashLaker
CrashLaker

Written by CrashLaker

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice. More on: https://crashlaker.github.io

No responses yet