LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2002, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 26 Nov 2002 08:11:15 -0600
Reply-To:     "Suzanne D. McCoy" <smccoy@LUCIDAN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Suzanne D. McCoy" <smccoy@LUCIDAN.COM>
Subject:      Re: Conversion of time - Europe - Asia
Comments: To: Howard_Schreier@ITA.DOC.GOV
In-Reply-To:  <200211261359.gAQDx6E11189@listserv.cc.uga.edu>
Content-Type: text/plain; charset=iso-8859-1

If you are going to have to do this for sets of data, you probably want to consider storing timezone as a variable. You can build a user defined format which stores the number of hours between the different time zones then apply the format to obtain the incremental value for the intnx function. If you need to adjust for Daylight Savings Time, that can be built into the format too, just remember that some places do not use DST. That would need to be taken into account when you build your format (combination of date ranges and increments). If you search for the phrase 'time zone' in the online doc, you will find a page that gives all the standard acronymns for timezone values.

Suzanne -- Suzanne D. McCoy Lucid Analytics Corp.

> Use the INTNX function. > > data _null_; > Paris_datetime = '26NOV02:23:00:00'DT; > Singapore_datetime = intnx('hour',Paris_datetime,7); > put Paris_datetime=datetime. / Singapore_datetime=datetime.; > run; > > Result: > > Paris_datetime=26NOV02:23:00:00 > Singapore_datetime=27NOV02:06:00:00 > > > On Mon, 25 Nov 2002 23:20:56 -0800, chuaby <chuaby@HOTMAIL.COM> wrote: > >>Hi >> >>I have a datetime field in Paris datetime which i need to convert it >>back to local datetime. May i know is there a function can i use to >>take in daylight saving into consideration ? >> >>eg : time difference between Paris and Singapore is 7 hrs now >>I would like Paris datetime = '26NOV02:23:00:00'DT >>to be Singapore datetime = '27NOV02:06:00:00'DT >> >> >>Thanks >>Boon Yiang


Back to: Top of message | Previous page | Main SAS-L page