View previous topic :: View next topic |
Author |
Message |
jayram99 Beginner
Joined: 16 Aug 2004 Posts: 52 Topics: 21 Location: falls church.va,usa
|
Posted: Wed Jun 25, 2008 9:09 am Post subject: SAS Date Conversion to DB2 Format |
|
|
Hi,
The Below query executed in SPUFI, The result is
2008-06-04-13.29.59.999999
Code:
***************************************************
SELECT
COALESCE(MAX(CHAR(DT_PROCSS_END)),CURRENT TIMESTAMP - 1 DAY)
AS DTPRCEND
FROM EN19M1.PROCSS_CYCL WHERE NAME_PROCSS = 'PCWD5706' WITH UR;
****************************************************
The Same query if used in SAS Code as belowCode:
CREATE TABLE MAX_DATE AS
SELECT
DTPRCEND
FROM CONNECTION TO DEVODS3R(
SELECT
COALESCE(MAX(CHAR(DT_PROCSS_END)),CURRENT TIMESTAMP - 1 DAY)
AS DTPRCEND
FROM EN19M1.PROCSS_CYCL
FOR FETCH ONLY
);
%PUT &SQLXMSG;
DISCONNECT FROM DEVODS3R;
/QUIT;
PROC PRINT DATA=MAX_DATE;
RUN;
The Output is as Below.
Output :
Code:
04JUN2008:13:29:59.999999
***************************************************
After execting the above SAS code, need to write to Output File in DB2 Format as below.
2008-06-04-13.29.59.999999
Appreciate your Help.
Jayaram |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Jun 25, 2008 9:16 am Post subject: |
|
|
are you sure that sas will only deliver that type of timestamp? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Fri Jun 27, 2008 4:56 am Post subject: |
|
|
It is possible, as I have done this or something similar in the past.
Hopefully have my libraries uploaded on Monday to see if I have an example. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
|
|