lundi 30 novembre 2015

Extract weekday from millisecond in a MSSQL query

I used the below query to extract the weekday by providing datetime that works fine but I need to extract weekday from a Millisecond column

If TIMEVAL is DATETIME datatype then below one works

SELECT DATEPART(dw,TIMEVAL) FROM Student;

If TIMEVAL is in Big Int (Millisecond) then the same query doesn't work

So, how can I get the WEEKDAY by using DATEPART for a column which contains MILLISECOND?

Aucun commentaire:

Enregistrer un commentaire