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 (August 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 7 Aug 2003 19:49:18 -0400
Reply-To:     Krishna Dandamudi <krishna_db@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Krishna Dandamudi <krishna_db@HOTMAIL.COM>
Subject:      Re: questions on datetime

Arto,

I can't see any specific reason to doubt SAS. To get 29JUL2003:12:58:35 you need to have 1375102715 not 1059569915. I believe it has something to do with dbf file not at sas side. Please make sure, the number you have in dbf file represents datetime format or not.

Code: -------- data _null_; dt=1059569915; *dtime='29JUL2003:12:58:35'dt; dtime=1375102715; format dt datetime20. dtime datetime20.; put dt dtime; run;

Result: --------- 29JUL1993:12:58:35 29JUL2003:12:58:35

In SAS DATETIME formats count the number of seconds since January 1, 1960.

Here is the calculation: 1059569915/(60*60*24*365) = 33.5987....Years 1960+ 33.5987=1993 Approx..

Thanks Krishna

"Arto Raiskio" <arto.raiskio@SUOMENPOSTI.COM> wrote in message news:bgui9t$sgqi9$1@ID-102906.news.uni-berlin.de... > I have a current DBF file produced daily from a call monitor system known as > Aspect > > this DBF contains a date and time value variable which has values in it like > > 1059569915 which translates via (data _null_;set;format d datetime.;put d=) > as > > 29JUL1993:12:58:35 > > now the question is why is this value 1993 when I know it is for July 29 of > this year or 2003 ? > > I know I can manually code for the wrong year value but I wonder why the 4 > year difference? > > a sample of yesterdays activity shows up as > > 1060214430 which sas translates to 06AUG93:00:00:30 > > can't think why the vendor would be off by 4 years? any ideas? >


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