Sunday, April 8, 2012

UTC columns in Infa Repository tables

You might have seen some UTC columns in Informatica repository tables. 


Eg: 'PARENT_SOURCE_UTC_LAST_SAVED' column in 'REP_ALL_SOURCES' view. Datatype for this column is 'Number'. Have you ever wondered about the value of this column?


This is one of the formats of date and this number denotes 'number of seconds from 1/1/1970' 


We can use the below query to find the time when an action was performed on the repository using the below logic on the UTC time columns that we have in Infa repository.

Will help us to get the time irrespective of the timezone (PST/PDT)

Just replace the number in bold in below query with the UTC value.

select
FROM_TZ (
cast ( (to_date( '01/01/1970 00:00:00', 'mm/dd/yyyy hh24:mi:ss') + 1300192052/86400) as timestamp(0) )
, '+00:00')
AT TIME ZONE 'US/Pacific'
from dual

Thanks Subbu for above query.

1 comment: