Answers for "sql convert timestamp to date"

SQL
3

sql timestamp to date

date_format(from_unix_time(`my_date`), '%e %b %Y') AS 'date_formatted'
cast(my_date as DATE)
Posted by: Guest on April-25-2021
3

convert timestamp to datetime

from datetime import datetime

timestamp = 1545730073
dt_object = datetime.fromtimestamp(timestamp)

print("dt_object =", dt_object)
print("type(dt_object) =", type(dt_object))
Posted by: Guest on May-19-2020
1

convert timestamp to datetime

from datetime import datetime

# current date and time
now = datetime.now()

timestamp = datetime.timestamp(now)
print("timestamp =", timestamp)
Posted by: Guest on May-19-2020

Code answers related to "sql convert timestamp to date"

Code answers related to "SQL"

Browse Popular Code Answers by Language