View Full Version : Converting a numeric field into a date field
David Abramowitz
02-12-2002, 04:01 AM
Assuming a numeric 6-byte date in YYMMDD format, and a date data field in any format, you would move the numeric to the date field thus:<pre> *YMD move YYMMDD Datefield</pre> Where YYMMDD is your numeric field, and Datefield is the date data type. Dave
gary.shipp@s3t.co.uk
02-12-2002, 05:49 AM
Can I use the same technique to move from a date field to a numeric field?
gary.shipp@s3t.co.uk
02-12-2002, 07:55 AM
I wish to use the RPGIV opcodes ADDDUR and SUBDUR to manipulate dates, however, the legacy files on my system hold dates in standard numeric fields. I presume its possible to move the numeric date into a 'proper' date field which I can then do whatever with. Could somebody post an example or two please? Also, can you tell me at the same time whether I can use the same process to put the date back into a numeric field i.e. when updating the file. Thanks in anticipation
David Abramowitz
02-12-2002, 07:55 AM
Yes. The ILE RPG manual (reference guide) lays it all out for you under the MOVE opcode documentation. Dave
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.