|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Silver Member |
Hi again
I have this problem with the AYMD function. (and possibly a problem with understanding data types in FOCUS). I need a computed field, which is a calculation of a DATE field, added with the value of 2 other fields in the same row. Here's what I have: DEFINE FILE BSEG_ACC -* Change date format to yymmdd format: -* CHGDAT('oldformat','newformat',indate,outfield) -* TMPDATE1/A17 = CHGDAT('DMY','YMD',EDIT(BSEG_ZFBDT),TMPDATE1); TMPDATE/I6YMD = EDIT(TMPDATE1); NUMDAYS/I2 = BSEG_ZBD1T + BSEG_ZBD2T; -* Add or subtract days to a date in yymmdd format: -* AYMD(inDate, #days, outfield) -* DUEDATE/I6 = AYMD(TMPDATE, NUMDAYS, DUEDATE); END[/code]I'm getting a table output, but the DUEDATE column is blank. Any ideas as to why I'm not getting a date? It seems I'm just missing some kind of conversion function or something. This message has been edited. Last edited by: <Mabel>, |
||
|
|
Silver Member |
Indeed.
I just figured it out myself as well :/ Thanks for replying! |
|||
|
|
Expert |
Tim, it appears that TMPDATE and DUEDATE are not of the same format. one is i6ymd and the other i6 only.. might be why its blank.
|
|||
|
|
Silver Member |
TMPDATE was already blank, because the EDIT(BSEG_ZFBDT) was returning a number, it looked like the amount of days since some date. But it doesn't matter, problem solved. Thanks for replying though. |
|||
|
|
Master |
DUEDATE/I6 can be zero, but how can it display as "blank"? Print all contributing fields to see where in the chain unexpected results appear: BSEG_ZFBDT (format?) BSEG_ZBD1T BSEG_ZBD2T TMPDATE1 TMPDATE NUMDAYS DUEDATE |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

