I have a record on the database duration field = "3600000", i just want to convert that into date and time, how do i do that?
I've tried this
..., SELECT GETDATE(duration) FROM Event ....,
and this
..., SELECT CONVERT(datetime, duration, 101) FROM Event ...,
and this
..., SELECT CONVERT(datetime, duration, ISO) FROM Event ...,
and this
..., SELECT CONVERT(datetime, duration) FROM Event ...,
ive always get ERROR on QUERY
reference https://www.w3schools.com/sql/func_mysql_convert.asp
Try this
select dateadd (ms,duration,'1900-01-01 00:00:00.000') FROM Event ...,
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.