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     [CLOSED] Adding/Subtracting Dates
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Adding/Subtracting Dates
 Login/Join
 
<d3nis370>
posted
I am trying to do two things. One is take a date and add 30 to it. This is what I have so far. Also the LAST_CONTACT_DT is in P9 format.


DEFINE FILE FDI001
NEXTFOLLOWDATE/YYMD=FDI001.FDI001.FDI001_LAST_CONTACT_DT + 30


When I display NEXTFOLLOWDATE it returns this


Last contact dt
20100820

Next follow date
20100850


It should show


Last contact dt
20100820
Next follow date
20100919




The next thing I am trying to do is see how many days open an account has been. This is what I have so far. Also DT_REPORTED is in P9 format.


DEFINE FILE FDI001
CurrentDate/P9=20100903;
BEGDTI/I8YYMD=CurrentDate;
ENDDTI/I8YYMD=FDI001.FDI001.FDI001_DT_REPORTED;
BEGDT/YYMD=ENDDTI;
ENDDT/YYMD=ENDDTI;
DIFFDAYS/I4=BEGDT - ENDDT;


Once I display DIFFDAYS all I get are 0.

This message has been edited. Last edited by: Kerry,
 
Reply With QuoteReport This Post
Master
posted Hide Post
...read the manual...! Roll Eyes

What is WF suppossed to do with +30 ?
+30 days?
+30 hours?
+30 months?

use the help!
Ironicly... search for : DATEDIF

Do tell you didn't even try that...

Greets,Dave


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 669 | Location: Veghel, The Netherlands | Registered: February 16, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
http://forums.informationbuild...731069712#4731069712 c/o: Mickey


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
 
Posts: 3045 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
FYI

The reason why your second option did not work is that you set the Begin and End dated the same.

BEGDT/YYMD=ENDDTI;
ENDDT/YYMD=ENDDTI;


As for adding a value to a date, if its stored ina P9, then its a number, you need to convert to a Smart Date, as you did in your second option.

This is basic stuff.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Adding/Subtracting Dates

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