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
|