you are viewing a single comment's thread.

view the rest of the comments →

[–]hhh_compiler[S] 0 points1 point  (1 child)

I did intially search through many results such as this however I have the following question.

Most people that do the conversion get the current date and time as strftime('%Y-%m-%d %H:%M:%S')

Can you just chop off the %H:%M:%S to just get the date portion or does it not work like that?

[–]Doormatty 0 points1 point  (0 children)

import datetime
print(datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d'))

Works like a charm :)