+ Reply to Thread
Results 1 to 4 of 4

Thread: Converting a numeric field into a date field

  1. #1

    Default Converting a numeric field into a date field

    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:
     *YMD move YYMMDD Datefield
    Where YYMMDD is your numeric field, and Datefield is the date data type. Dave

  2. #2
    gary.shipp@s3t.co.uk Guest

    Default Converting a numeric field into a date field

    Can I use the same technique to move from a date field to a numeric field?

  3. #3
    gary.shipp@s3t.co.uk Guest

    Default Converting a numeric field into a date field

    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

  4. #4

    Default Converting a numeric field into a date field

    Yes. The ILE RPG manual (reference guide) lays it all out for you under the MOVE opcode documentation. Dave

+ Reply to Thread

Similar Threads

  1. Comparing date field to numeric date
    By Guest.Visitor in forum SQL
    Replies: 3
    Last Post: 03-14-2007, 12:29 PM
  2. Replies: 6
    Last Post: 02-11-2005, 09:33 AM
  3. Moving a date defined field to a numeric field using free format
    By buck.calabro@commsoft.net in forum General
    Replies: 2
    Last Post: 05-25-2004, 02:00 AM
  4. Update numeric field with current date?
    By Guest.Visitor in forum SQL
    Replies: 2
    Last Post: 04-04-2002, 10:16 AM
  5. Moving numeric field to date data type field.
    By Guest.Visitor in forum Application Software
    Replies: 19
    Last Post: 08-20-2000, 04:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts