+ Reply to Thread
Results 1 to 6 of 6

Thread: Pros and Cons of defining date fields as date type fields in PF

  1. #1

    Default Pros and Cons of defining date fields as date type fields in PF

    On all new files/tables I create, I've been using date or timestamp types - much easier to deal with when using SQL, and you don't have to convert the numerics when want to use date logic in RPGIV. IMHO

  2. #2
    Brenda Roth Guest

    Default Pros and Cons of defining date fields as date type fields in PF

    Thank you for your input. Using date type fields is what I would like to do but just wondered if anyone had run into any problems.

  3. #3
    Brenda Roth Guest

    Default Pros and Cons of defining date fields as date type fields in PF

    If using a date type field in a pf, and this field is populated by entering data through a display file, will the user have to enter the separators (for ISO) for the date?

  4. #4
    Guest.Visitor Guest

    Default Pros and Cons of defining date fields as date type fields in PF

    Don't use native date fields on a display file. The user will be *forced* to enter valid dates even when they just want to simply exit out of the screen. It's better (in my opinon) to convert the date to a number for display file purposes. Chris
    Code

  5. #5
    Brenda Roth Guest

    Default Pros and Cons of defining date fields as date type fields in PF

    I am not sure whether to define date fields as date type or numeric. Does anyone have any suggestions?

  6. #6

    Default Pros and Cons of defining date fields as date type fields in PF

    Using the DATFMT and MAPVAL key words in the display file will allow dates to be displayed as blank fields if they contain the default value. If the user does key in the date, the system will validate it for you for correctness. In my example, StuBdt contains 090605. The Eval statement allows it to be displayed as 09/05/2005. If this date is invalid, '01/01/0001' is moved to the field and it displays as blanks.
    Code

+ Reply to Thread

Similar Threads

  1. Data Transfer and Date Type Fields
    By Brenda Roth in forum RPG
    Replies: 0
    Last Post: 10-01-2007, 07:23 AM
  2. Date Type Fields
    By Guest.Visitor in forum RPG
    Replies: 4
    Last Post: 10-01-2007, 07:11 AM
  3. Date Type Fields
    By Brenda Roth in forum RPG
    Replies: 0
    Last Post: 09-05-2007, 11:25 AM
  4. SQL & Date Fields
    By Guest.Visitor in forum SQL
    Replies: 3
    Last Post: 03-12-2002, 05:23 AM
  5. Date Fields
    By Guest.Visitor in forum Programming
    Replies: 5
    Last Post: 09-29-2000, 10:20 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