How to convert SQL Server SMALLDATETIME to Unix timestamp?

How do I convert SQL Server SMALLDATETIME to a Unix timestamp?

the date was stored as CAST (0x96040474 AS SmallDateTime) in MS Access DB. The data has been flushed to SQL, and I want to convert it to Unix Timestamps for MySQL.

Thanks AO

+3
source share
3 answers

select lateiff (ss, '1/1/1970', your_date_here)

eg.

select lateiff (ss, '1/1/1970', cast ('1/1/1989' as smalldatetime))

+1
source

SQL Server 2005 Books Online Transact SQL Reference

Database Engine smalldatetime 2 . 2 1 1900 . 2 .

, , 1900/01/01 1970/01/01, .

0

The PHP strtotime () function will take smalldatetime as an argument.

0
source

All Articles