- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 03-15-2011 03:15 PM
(9340 views)
Can somebody let me know how do we convert the UTC date time to other timezone values.
Is there any SAS functiion for this ?
Is there any SAS functiion for this ?
5 REPLIES 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use the INTNX function to adjust a DATETIME type SAS variable after inputting it. Also, you may find prior posts on these forums, as well as SAS-hosted DOC and supplemental technical / conference reference material (suggesting website SEARCH or using Google advanced search below).
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic / post:
utc datetime values intnx function site:sas.com
Scott Barry
SBBWorks, Inc.
Suggested Google advanced search argument, this topic / post:
utc datetime values intnx function site:sas.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you have a datetime value in UTC, just subtract 5 hours to get EST:
data _null_;
utc = '15mar2011 21:15:21'dt;
est = utc - 5*60*60;
format utc est datetime.;
put (_all_) (/=);
run;
/* on log
utc=15MAR11:21:15:21
est=15MAR11:16:15:21
*/
data _null_;
utc = '15mar2011 21:15:21'dt;
est = utc - 5*60*60;
format utc est datetime.;
put (_all_) (/=);
run;
/* on log
utc=15MAR11:21:15:21
est=15MAR11:16:15:21
*/
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have done similar program. But I am asking is there a function which does it autromatically... by taking locale as a input parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Locale, as in some GMT offset somewhere out in the operating system enviroment?
Not likely - check the DOC and consider using INTNX with your adjustment as argument #3.
Scott Barry
SBBWorks, Inc.
Not likely - check the DOC and consider using INTNX with your adjustment as argument #3.
Scott Barry
SBBWorks, Inc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
> ...is there
> a function which does it autromatically... by taking
> locale as a input parameter.
No, there isn't one among the built in.
> a function which does it autromatically... by taking
> locale as a input parameter.
No, there isn't one among the built in.