ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

retriving system date

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

  • retriving system date

    hai this is sriram
    how to reterive system date in rpgle?and coding is needed for me?

  • #2
    Re: retriving system date

    Define a date field (for example SysDate)

    Calc line

    Eval SysDate = %date()

    Comment


    • #3
      Re: retriving system date

      You can also use the following

      MOVE *DATE RDATE

      Where RDATE will be character of length 8.

      -KR
      Regards,
      KR

      Comment


      • #4
        Re: retriving system date

        *DATE and UDATE will retrieve the job date, not the system date. The job date is the date the job entered the system. System date is the actual date from the system clock. These are different when, for example, a job is started and runs beyond midnight.

        To get the system date, you need to use the TIME command or the %DATE() function.

        Comment


        • #5
          Re: retriving system date

          You could also pick it up in the program status data structure - positions 276-281

          Comment


          • #6
            Re: retriving system date

            Can u send me code for retriving system date using TIME or %date

            Comment


            • #7
              Re: retriving system date

              SysDate = %date()

              Comment


              • #8
                Re: retriving system date

                Personally I have a copy of Bob Cozzi's book "The modern RPG IV language" sat on the end of my desk.

                If you can't stretch to that then there's a similar body of information here:
                Ben

                Comment

                Working...
                X