Mapping: Converting GMT to US time zones with DST
Posted by: Amit Kumar Sinha
A reusable PowerCenter mapplet to convert time from GMT to US time zones, taking care of Day Light Savings.
Overview
While there are pre-built functions available within PowerCenter to transform dates, sometimes we have requirements where a reusable object can be built to handle some complex scenarios that can be shared across the project. One such example is converting time between time zones.While converting date-time between different time zones can be achieved by using the ADD_TO_DATE() function, the use of Day Light Saving Time (DST) during summer in many countries makes the required logic non trivial.In this listing you can download a mapplet which implements the logic necessary to convert input date-time in GMT to US time zones. The logic uses a flat file reference data which contains the DST start and end dates for the years 2007 through 2015.You can download this listing as part of the Bundle : Data Warehouse.
Features
- PowerCenter version 9.1 and 9.5