Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Mixing dates *mdy / *iso

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

  • Mixing dates *mdy / *iso

    Have you tried defining the dates within the "D" specs individually (e.g.) DUSAFDate s d datfmt(*usa) USA From Date Dave

  • #2
    Mixing dates *mdy / *iso

    David, Yes I have tried that, thinking that by defining the date field as *iso it would override my header definition. By doing this, I still can't get a compile: see code below, error returned: "The value D'2005-06-' is not a valid *MDY/Date literal" Diane
    Code

    Comment


    • #3
      Mixing dates *mdy / *iso

      Diane, Have you tried a different approach such as -
       eval dsISOdt=%date('2005-06-01':*iso) 
      HTH, Joe

      Comment


      • #4
        Mixing dates *mdy / *iso

        Joe, %date - exactly what I needed. Thanks for the tip, I've researched the %date BIF and found an article that explains it's function. Many Thanks! Diane

        Comment


        • #5
          Mixing dates *mdy / *iso

          I'm testing a display file that has 11 date fields, 10 dates are *mdy, 1 is a parameter coming into my program that is *iso format. Within the header spec of the RPG program, datfmt(*mdy) is defined. The issue happens when I try to move the parameter (iso date field) into the display file (iso date field), because of the *mdy header, I cannot compile the program. The program wants my *iso date field to be a *mdy field. Now if I remove the *mdy from the header spec, then I have the reverse issue, my 10 date fields that are *mdy, tries to be *iso. I'm guessing I need to bring my *iso parm into my program, convert it to a *mdy and then move that into my display file field, thus defining all 11 date fields to *mdy and forget trying to mix the *iso & *mdy. Any thoughts? Diane Mueller

          Comment


          • #6
            Mixing dates *mdy / *iso

            Along with Joe's post that pointed me to the %date, I wanted to post a link that was helpful with my date issues: http://www.itjungle.com/fhg/fhg051904-story01.html

            Comment

            Working...
            X