mercredi 6 mai 2015

Sql DATEDIFF keeps ignoring seconds part of date

I am getting 0 on executing the following statement:

select DATEDIFF(mi,'1970-01-01 00:00:00','1970-01-01 00:00:01') * CONVERT(BIGINT,60)*1000  as BidTicks    

Whereas I get 6000 on executing this:

select DATEDIFF(mi,'1970-01-01 00:00:00','1970-01-01 00:01:01') * CONVERT(BIGINT,60)*1000  as BidTicks    

What are my options?

Aucun commentaire:

Enregistrer un commentaire