grzegorz
20th August 2002, 14:14
In one of my update sessions I use date.num() function to obtain current date. When the sesion is started from menu everything is OK. But when the session runs from job, date.num() returns zero. Does anybody know, what can be wrong?
Version BIV c4, Solaris, tbase.
OmeLuuk
20th August 2002, 15:25
I am not sure, but maybe the predefined variable DATE that is used in function date.num() is not available when run in background? Can you use the predefined variable DATE instead?
grzegorz
20th August 2002, 15:42
Can you use the predefined variable DATE instead?
Do I have to #include something?
I get a compilation error : 'date' not declared.:confused:
OmeLuuk
20th August 2002, 15:47
HELP VIEWER: Predefined Variables (ttprog0050)
* Variables of type long
date R number of days since 01-01-0001
[Sometimes predefined variables are only avaiable in certain program sections (or actually functions within the standard program)...]
And also:
long DATE.NUM( )
The function DATE.NUM returns the number of days since 01-01-0001 until the system date. This number is also available in the standard variable DATE.
grzegorz
20th August 2002, 15:50
OK, I have manuals..
But in fact my script won't compile with 'date' variable. And I don't know why.
OmeLuuk
20th August 2002, 16:10
No include should be needed... strange... maybe try long date...
klesch
20th August 2002, 17:05
Post your script...
Originally posted by grzegorz
OK, I have manuals..
But in fact my script won't compile with 'date' variable. And I don't know why.
benito
20th August 2002, 22:18
I remember a couple of years ago, there was a porting set that has problem with predefined variable 'date'. Maybe that's you're case?
~Vamsi
20th August 2002, 22:53
Grzegorz,
Some sections of the program (especially form sections) do not fire when run in the job mode. Make sure you are assiging the date.num() after the choice.cont.process: section.
On a personal note, keep away from 'date'. I never had that working - even though it is documented.