CA Service Management

 View Only

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

Feb 16, 2017 10:45 AM

USE mdb
SELECT ref_num, dbo.secs2date(open_date) as open_date
FROM call_req

 

 

By Jerome Mayer 

 

 

SET QUOTED_IDENTIFIER OFF
GO
CREATE FUNCTION dbo.secs2date(@numSeconds bigint)returns varchar(20)
as begin
    return convert(varchar(20), dateadd(ss, @numSeconds, '01-01-1970 00:00:00'), 101)
end

GO

[dbo].[secs2date] 

 

 

 

 

select DATEADD(ss, open_date, '19700101') UTCDate
from call_req

 

 

How to convert using javascript:

CA PAM::.Javascript::. getTime() Method 

 

 

 

Summary CA SDM  MS SQL Querys - TSQL 

CABI4::. - BOXI - Web Intelligence - Date Formats - How to change date formats - Como formatar datas 

Statistics
0 Favorited
12 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Feb 16, 2017 12:50 PM

For eveyone's information.

 

The converted time will be UTC.

 

It means you will need to manage your local timezone, and daylight saving time if appicable.

 

Look at T-SQL Toolbox - Home if you need to handle DST and Timezone

Related Entries and Links

No Related Resource entered.