I have an unsigned int that I convert to datetime using:
pd.to_datetime(date_and_time,unit="s",origin='1906-05-01')
How can i convert this using MySQL? I tried from_unixtime(date_and_time)
, but it just returns NULL
I have an unsigned int that I convert to datetime using:
pd.to_datetime(date_and_time,unit="s",origin='1906-05-01')
How can i convert this using MySQL? I tried from_unixtime(date_and_time)
, but it just returns NULL
This is not a standard unix timestamp, since you set the starting point to '1906-05-01'
. Basically, what you need is '1906-05-01' + 2626070399 seconds
.
You can achieve this with the following mysql query:
select date_add('1906-05-01',interval 2626070399 second)
Or
select '1906-05-01' + interval 2626070399 second