Page 1 of 1

System date and time

PostPosted: Thu Jun 02, 2011 1:33 am
by needhelp
Are there keywords to getting the system date and time? If so, what are the keywords and what format is each returned in?

Re: System date and time

PostPosted: Thu Jun 02, 2011 2:29 am
by Robert Sample
Would it not be better for YOU to read the manual for this instead of us reading the manual and regurgitating it to you? You might actually learn something by doing your own research.

Re: System date and time

PostPosted: Thu Jun 02, 2011 2:41 am
by needhelp
I have looked in the manual and it did not give the format for sysdate and there was nothing at all about system time. I've been doing google searches and can't find anything. That is why I am coming here. I didn't expect such a very unhelpful response.

Re: System date and time

PostPosted: Thu Jun 02, 2011 3:20 am
by dick scherrer
Hello,

I'm not aware of where this might be documented (if it is). I don't see anythng in the current manuals.

In "the old days" everywhere i went, there was a callable cobol or assembler routine that would return the system date and time in multiple formats. Ask around if such a module exists that you couild call from Easytrieve.

These days many people retrieve the date/time from db2 (assuming the process uses db2).

I'd be interested to hear how others are getting the system date/time these days. I'll try to do a bit of digging this evening. . .

Re: System date and time

PostPosted: Thu Jun 02, 2011 3:54 am
by needhelp
Thanks Dick, it pretty much confirms what I have not been finding. The program is not using DB2. I find it odd that it is not something readily available for easytrieve.

Re: System date and time

PostPosted: Thu Jun 02, 2011 6:51 am
by dick scherrer
Hello,

For the current date, try SYSDATE.

SYSDATE is a read only eight-byte alphanumeric field which contains the system date at the start of EASYTRIEVE PLUS execution. SYSDATE will have MM/DD/YY format.

and
I don't know if it still does, but Easytrieve Plus used to zero suppress the MM for Jan through Sep. That bit me one time when I used the MM portion of SYSDATE in a calculation (S0C7).


Depending on which release you are using, this may work. . .

Re: System date and time

PostPosted: Thu Jun 02, 2011 3:09 pm
by BillyBoyo
Further, as well as SYSDATE you should find SYSTIME available. Assuming you are on an up-to-date version, you'll also have access to "year 2000" dates, like SYSDATE-LONG.

Whilst the RUN date is useful information at times, if you are only printing one date, for me it should be the business date available somewhere in your system. Business date, run date and run time all together are best for problem resolution.