Date: Tue, 17 Jun 2003 14:09:33 -0400
Reply-To: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject: Re: GMT timezone conversion
Content-Type: text/plain
> From: Al Olivera [mailto:alo@FEDEX.COM]
> I was wondering if anyone knows of a formula for converting
> GMT to a daylight savings timezone offset, such as Eastern or
> Central US.
>
> I have seen the following formula in IT/Service Vision's
> sitelib, but it is pretty ugly, and undocumented:
DHMS(MDY( 4
, 8-WEEKDAY(MDY( 4, 7,YEAR(DATEPART(DATETIME))
) )
, YEAR(DATEPART(DATETIME))
),3,0,0)
<DATETIME
<DHMS(MDY(10
,32-WEEKDAY(MDY(10,31,YEAR(DATEPART(DATETIME))
) )
,YEAR(DATEPART(DATETIME))
),2,0,0)
just translating into a more readable
not sure if the less-than signs in front of
<DATETIME
<DHMS(MDY(10
are correct, but that's that I cut&pasted.
> The functions are all familiar to me, but all those paren's
> make it look like LISP or something.
>
> Anybody know if a way to convert GMT to EST? or, how to use
> the above?!?!
Ron Fehd the LISPeth mathen CDC Atlanta GA USA RJF2@cdc.gov
"Nothing is particularly hard
if you divide it into small jobs."
- Henry Ford, Industrialist
... or small functions
|