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 (March 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 24 Mar 2003 15:58:21 +0200
Reply-To:     Arto Raiskio <arto@RAISKIO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arto Raiskio <arto@RAISKIO.COM>
Subject:      Re: equivalent to Dateadd(seconds,var,'1 Jan 1970')

"Arun Kumar" wrote > You can use INTNX function for this. Like INTNX ('Seconds' , S, K), Where > 'K' is the increment by which you want your date variable 'S' to be > forwarded.

right inside the Proc Sql statement? how?

currently the SQL Server View and Stored procedure looks like

SELECT from dbo.mytable.item1, dateadd('seconds',myvarinseconds,'01 Jan 1970') WHERE (dateadd('seconds',myvarinseconds,'01 Jan 1970') > '03/20/2003 00:00:00')

or did you mean do a generic extract and then apply intnx? I wanted to do it all in one proc sql step without a data step at the end.

> have some data in SQL server and created views and stored procedures > directly in SQL server to see the formats and variables > > now, what might be the equivalent in Proc Sql to the dateadd() function? > > k = number of seconds past since 01/01/1970 00:00:00 hour > select DateAdd("s", k, "01.01.1970") formats the data into the format of > 03/24/2003 00:00:00


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