T.R | Title | User | Personal Name | Date | Lines |
---|
502.1 | GETSTIME | AIMHI::CIONI_L | | Wed Mar 25 1992 15:48 | 5 |
|
Did you try using subroutines like GETSTIME to retrieve the DEC
standard date and time field?
LisaC
|
502.2 | Try dialogue manager variables | KAHALA::FOREMAN | Nothings Impossible, you just run out of time | Wed Mar 25 1992 15:49 | 11 |
| It depends on the format of your database date ( if your talking about
and RDB database with a field described as DATE it's a whole different
ballgame ). If I were you I'd try using the system variable date
functions (&DATE, &MDY,&DMY,&YMD) via a dialogue manager set
statement. At least with these you're starting with a value that
FOCUS understands to be a date, not a text string like you get with
the TODAY function.
Good luck,
Sharon
|
502.3 | defined field substitution with IF statement | ISLNDS::MORIN | | Thu Mar 26 1992 11:28 | 34 |
|
Below you will find the fex used to retrieve system date less specified
number of day. The process to define the TESTDATE field works fine.
The next step is to use the field value in a conditional test. When I
try to use the defined field in an IF statement I get the following
error :
(FOC006) FORMAT OF TEST VALUE IS INCORRECT : TESTDATE
Is there a special format used to evaluate the value in a defined
field?
Peter
BTW: Thanks for pointing me in the right direction for retrieving
current system date.
DEFINE FILE TEST
TESTDATE/I6= AYMD(&YMD,-42,TESTDATE);
END
TABLE FILE TEST
PRINT DATE_TIME AND TESTDATE
IF DATE_TIME GE TESTDATE
|-------------- VARIABLE IN QUESTION
IF RECORDLIMIT EQ 10
END
|
502.4 | Use Where to compare values | KAHALA::FOREMAN | Nothings Impossible, you just run out of time | Fri Mar 27 1992 14:18 | 8 |
| Hi,
Change your IF statement to a WHERE statement and it should correct
your problem ( need a semi-colon at the end ).
WHERE DATE_TIME GE TESTDATE;
Sharon
|
502.5 | Literal datatype | EVTDD1::CARRIERE | Jean-Claude Carriere | Sat Mar 28 1992 07:42 | 6 |
|
The other solution is to change TESTDATE datatype (e.g. to a YMD)
DEFINE FILE TEST
TESTDATE/YMD=AYMD(&YMD,-42,TESTDATE);
END
|
502.6 | Resolution to Date problem | ISLNDS::MORIN | | Wed Apr 01 1992 14:51 | 26 |
| Thanks for all your help. Attached is the process I decided to use to
resolve the proplem in .0.
DEFINE FILE TEST
TESTDATE/I6= AYMD(&YMD,-42,TESTDATE);
END
FILEDEF TKNDTE DISK TKNDTE.FTM
TABLE FILE TEST
PRINT TESTDATE
IF RECORDLIMIT EQ 1
ON TABLE HOLD AS TKNDTE
END
The way I tested the database field against the date in the hold file
was:
IF DATE_TIME GE (TKNDTE)
Thanks again for everybodies help.....
Peter
|