- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 09-10-2019 08:10 AM
(2527 views)
Hello,
Could anyone help me to convert SAS UTC datetime to EST datetime?
Thanks for your help.
kind regards,
Amine
Example:
2011/01/03 01:03:00
2011/01/03 01:04:00
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
1. Like this?
data _null_;
X='2011/01/03 01:03:00';
format UTC EST datetime.;
UTC=input(X,anydtdtm.);
EST=intnx('hour',UTC,-5,'s');
put UTC= EST=;
run;
UTC=03JAN11:01:03:00 EST=02JAN11:20:03:00
2. Maybe you don't need to transform anything at all. Look at the TIMEZONE option.