Help using Base SAS procedures

Time Zone conversion

Reply
N/A
Posts: 0

Time Zone conversion

Is there a simple way to convert a timestamp in GMT to EDT? Any assistance would be greatly appreciated.
Super Contributor
Super Contributor
Posts: 3,174

Re: Time Zone conversion

Posted in reply to deleted_user
Explore using the INTNX function in a DATA step, based on the local-time (some identifying data value or general application rule).

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: Time Zone conversion

Thanks!!
Valued Guide
Posts: 2,177

Re: Time Zone conversion

Posted in reply to deleted_user
rather than just subtracting 5hours (edt=gmt-'5:0:0't; ), have a look into the time-zone handling documentation at
http://support.sas.com/documentation/cdl/en/lrdict/61724/HTML/default/a003169814.htm

Also, in Formats-by-category, under "time formats", two formats look promising
E8601TMw.d Format
Writes time values using the ISO 8601 extended notation hh:mm:ss.ffffff.

E8601TZw.d Format
Adjusts time values to the Coordinated Universal Time (UTC) and writes them using the ISO 8601 extended notation hh:mm :ss+|-hh:mm.

PeterC
Ask a Question
Discussion stats
  • 3 replies
  • 164 views
  • 0 likes
  • 3 in conversation