ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

diff between *date and udate?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • diff between *date and udate?

    can someone pls tell what is the difference between *date and udate

  • #2
    Re: diff between *date and udate?

    UDATE returns a 6-digit date, with 2 digits for the year.

    *DATE returns a 8-digit date, with 4 digits for the year.
    John McKay
    jmckay@mckaysoftware.ie
    http://www.rpglanguage.com

    Comment


    • #3
      Re: diff between *date and udate?

      One starts with the letter 'U'... the other has an asterisk in front.

      Comment


      • #4
        Re: diff between *date and udate?

        Additionally, from the ILE RPG Reference Manual, << the user date special words (UDATE, *DATE, UMONTH, *MONTH, UDAY, *DAY, UYEAR, *YEAR) allow the programmer to supply a date for the program at run time.>>
        Philippe

        Comment


        • #5
          Re: diff between *date and udate?

          ... but don't forget both (*DATE and UDATE as well as UDAY, *DAY, UMONTH, *MONTH, UYEAR and *YEAR) return the job date and not the current or system date. To retrieve the system date you either have to use the opcode TIME or the Built-in-Function %Date() without parameters.

          The job date is the date when the job started, while the system date is the current date. For example, if some one starts a job on monday morning and does not signoff before friday, *DATE and UDATE return still the monday's date.

          Birgitta

          Comment


          • #6
            Re: diff between *date and udate?

            Birgitta,
            Useful remarks to point out to the Forum Community as usual. Thanks.
            Philippe

            Comment


            • #7
              Re: diff between *date and udate?

              Great point Birgitta, that bit of information was more than useful.

              Cheers,
              Rechit

              Life would have been great, if I had it's sourcecode.
              A failure teaches you more than what a success does.

              Comment

              Working...
              X