Skip navigation
All People > TMACUL > Tiago MACUL's Blog > 2017 > February > 23

CA SDM::. How to convert CA Format date -  Unix epoch time - seconds date? 

 

select convert(varchar(25), DATEADD(ss, open_date, '19700101'),113) 
from call_req

Exemplo de resposta: "12 Set 2002 19:00:00:000"

 

select convert(varchar(10), DATEADD(ss, open_date, '19700101'),103) + ' ' +
convert(varchar(8), DATEADD(ss, open_date, '19700101'),114)
from call_req

Exemplo de resposta: "12/09/2002 19:00:00"

 

 

CAST e CONVERT (Transact-SQL)