Skip to Content

Convert DateTime from GMT to EST in DataFlow in DS

Good Afternoon,

I have a problem I am struggling with in a data flow of one of our ETL's. I have a column that is DateTime but it is in GMT time. I need to convert this to Eastern Standard Time zone so when it populates the table its already been converted to our time zone. I having difficultly finding a way to convert this. Please help! 😕

Thank you,

Tiffany

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 08, 2014 at 06:29 PM

    Hi,

    You could achieve this with couple of variables and post load command in a script if your server and local machine are in different timezones


    Use the function getUTCdate() and getdate() to get the timezones. Take the difference of these two in hours and add that hours to your original timezone.


    Arun

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Tiffany Holbrook

      The script should be like this

      1) Variable should be global variable, it helps.

      2) $GV_Timezone = sql('UCCX',' SELECT DateAdd(hour, DateDiff(hour, getdate(),getutcdate()), startdatetime) FROM tablename');

      Arun