1. Why DATEPART function is not working
2. Datepart
Hi, =20 Can some one help me on this. =20 I have a variable which consist of datetime by using this variable I need to create another variable in date and use this variable as start_dte and end_dte. Since I know how to use extract date in Teradata as ( cast function) but not in PROC SQL. =20 Thanks in advance. RP =20 =20 =20 =20 =20
3. selecting Proc Sql datepart
4. datepart autoformat in a macro
section of a macro executes an item that appears as
a = put( intnx ( 'day', date(), -1), mmddyy6. );
this returns to a macrovariable in another section today-1, ie. 062203
question is, what dateformat would return the value in the format
'22Jun2003'd ? with quotes and D, all of it?
pseudocode:
a = put( intnx ( 'day', date(), -1), ddMMMyyyy. );
this code is passed on to a Proc SQL which extracts data in the format
..and (datepart('01jan70:00:00:00'dt+A.occurrance) = '22jun2003'd )
should one of these be ok on a unix sas 8.2 system?
I have a sybase db with a _my_date and _my_time field(s)
proc sql;
select datepart ( _my_date) as _date format=mmddyy6.,
timepart (_my_time) as _time format=time.
from my_db;
quit;
proc sql;
select datepart ('01jan70:00:00:00'dt+_my_date) as _date format=mmddyy6.,
timepart ('01jan70:00:00:00'dt+_my_time) as _time format=time.
from my_db;
quit;
am getting an error with both formats "wrong number of parameters to
function datepart"
7. Oracle equivalent of sasdate=datepart(oracledatetime)?
8. Proc SQL, multiple datepart selection
having some trouble selecting multiple dates from a sql table this does not work, it gives all dates while matching to the ID part Proc Sql; select * from a where (234 < id <= 235) and (datepart(odate) = '01Aug2003'd or datepart(odate) = '05Aug2003'd) odate contains date and time, looking like 01Aug2004:08:12:10:00