0

I have the following in jython talking to an AS400:

system = AS400(ip, USER, PWORD)
obj = ObjectDescription(system, 'qsys','jbrdata', 'lib')
d = obj.RESTORE_DATE

The object that returns is a java.util.DATE/INT but unlike what i expected its only a 3 digit response. I need to get the date in a YYYYMMDD format

Can someone please help me with this?

I looked at the documentation here but it doesn't seem helpful

user2213551
  • 26
  • 1
  • 6

1 Answers1

0

Since the getValue(ObjectDescription.RESTORE_DATE) method is returning a Date object, you'll need to format it as a date.

In Java you can do this using a DateFormat object.

DateFormat df = new SimpleDateFormat("ymd");
David G
  • 3,940
  • 1
  • 22
  • 30