Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Date/Time in -Set
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Date/Time in -Set
 Login/Join
 
Gold member
posted
I am trying to get Date/Time values in a -SET. I need the beginning of the current month, end on the current month, and the beginnning of the current year. I normally do this with just a YYMD format, but the database I am querying is in HYYMDm format. Please help!

(Whate I normally do)
-SET &BOM=DATECVT(( DATEMOV((DATECVT(&YYMD,'I8YYMD','YYMD')),'BOM')),'YYMD','I8YYMD');
-SET &EOM=DATECVT(( DATEMOV((DATECVT(&YYMD,'I8YYMD','YYMD')),'EOM')),'YYMD','I8YYMD');
-SET &BOY=DATECVT(( DATEMOV((DATECVT(&YYMD,'I8YYMD','YYMD')),'BOY')),'YYMD','I8YYMD');

This message has been edited. Last edited by: Kerry,


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 58 | Registered: June 18, 2009Reply With QuoteReport This Post
Gold member
posted Hide Post
Also, I've tried concatenating a time on the end of the date value, but receive an error.

SET TRACEOFF=ALL
SET TRACEUSER=CLIENT
SET TRACEON=STMTRACE//CLIENT
-SET &BOM=DATECVT(( DATEMOV((DATECVT(20101229,'I8YYMD','YYMD')),'BOM')),'YYMD','I8YYMD');
-SET &EOM=DATECVT(( DATEMOV((DATECVT(20101229,'I8YYMD','YYMD')),'EOM')),'YYMD','I8YYMD');
-SET &BOY=DATECVT(( DATEMOV((DATECVT(20101229,'I8YYMD','YYMD')),'BOY')),'YYMD','I8YYMD');
-SET &BOY2=EDIT(20100101, '99999999') | ' 00:00:00.000000';
TABLE FILE ORDERS
PRINT
ID
ORDERED_DATE
REVENUE_CODE_ID
STATUS
WHERE ORDERED_DATE GE 20100101 00:00:00.000000;
END
0 ERROR AT OR NEAR LINE 17 IN PROCEDURE mav_brokerage_batr
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: 00:00:00.000000
BYPASSING TO END OF COMMAND
(FOC009) INCOMPLETE REQUEST STATEMENT


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 58 | Registered: June 18, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Try this in your WHERE clause:

WHERE ORDERED_DATE GE DT(&BOY 00:00:00);


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Reply With QuoteReport This Post
Gold member
posted Hide Post
Thanks!


WebFOCUS 768
OS/400
HTML, also quite a few active reports and excel.
 
Posts: 58 | Registered: June 18, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Date/Time in -Set

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.