BookmarkSubscribeRSS Feed
Amine_Khemiri
Obsidian | Level 7

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
ChrisNZ
Tourmaline | Level 20

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.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2198 views
  • 1 like
  • 2 in conversation