How do you put the system date into *ISO format?
5 pts.
0
Q:
How do you put the system date into *ISO format?
Update an *ISO date in RPGLE?
ASKED: Oct 9 2008  5:51 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
370 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
these sites might help you:

Site 1
Site 2
Site 3

If not, you might want to be a bit more specific.
Good Luck!
-Flame
***************************


The date data fields are all held internally the same way, the date format is a purely visual thing. For example, you could have the following (spacing not exact):


D IsoDate s d DatFmt(*ISO) Inz(d'2008-10-31)
D UsaDate s d DatFmt(*USA) Inz(d'07/04/2008')
D EurDate s d DatFmt(*EUR) Inz(d'25/12/2008')

D MyDate s d DatFmt(*ISO) Inz(*Sys)


C MyDate Dsply
C Eval MyDate = IsoDate
C MyDate Dsply
C Eval MyDate = UsaDate
C MyDate Dsply
C Eval MyDate = EurDate
C MyDate Dsply
C Eval MyDate = %Date()
C MyDate Dsply
C


When you run the program you should see the current date, 2008-10-31, 2008-07-04, 2008-12-25 and the current date displayed in sequence. What this demonstrates is that no matter what format the incoming date, the resulting date field shows it in its own format. The %Date() function returns the current system date.

IIf you know the format of the incoming date you can specify it in the %Date() function. For example:

Eval MyDate = %Date(d'07/04/2008' : *USA)

Jonathan
*******************************************************
Last Answered: Oct 13 2008  9:38 PM GMT by Astradyne   370 pts.
Latest Contributors: Flame   14495 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Modiyooch   370 pts.  |   Oct 10 2008  3:04PM GMT

Dtdate s d datfmt(*iso)
c time tdate

 
0