1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Inconsistency in Date Formats Between @DATE and @MAKEDATE

Discussion in 'Support' started by Jay Sage, Dec 23, 2009.

  1. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    There is an inconsistency in the date format specifications between the
    functions @DATE and @MAKEDATE. For @DATE, format 4 is defined as:

    4 ISO (yyyy/mm/dd)


    For @MAKEDATE it is:

    4 ISO 8601 (yyyy-mm-dd)


    In one case the separator is slashes; in the other it is hyphens. The
    @MAKEDATE function does generate output with hyphens. The @DATE function
    seems to accept either hyphens or slashes in the input.

    If nothing else, the help files should be corrected.

    -- Jay
     
  2. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,523
    Likes Received:
    4
    Jay Sage wrote:
    | There is an inconsistency in the date format specifications between
    | the functions @DATE and @MAKEDATE. For @DATE, format 4 is defined as:
    |
    | 4 ISO (yyyy/mm/dd)
    |
    |
    | For @MAKEDATE it is:
    |
    | 4 ISO 8601 (yyyy-mm-dd)
    |
    |
    | In one case the separator is slashes; in the other it is hyphens. The
    | @MAKEDATE function does generate output with hyphens. The @DATE
    | function seems to accept either hyphens or slashes in the input.
    |
    | If nothing else, the help files should be corrected.

    Look at topic "datefmt.htm" - it clearly explains that in date input almost
    any nonnumeric character, including letters, is an acceptable separator. For
    example, 2004m5.1 and 2004-05-01 are interpreted identically. Your concern
    has been covered sinve the V6 issue of the help files.
    --
    Steve
     
  3. Jay Sage

    Joined:
    Jun 2, 2008
    Messages:
    284
    Likes Received:
    1
    I still think that the help information should be consistent in the two
    functions regarding what the ISO standard format #4 means. The fact that
    input with other separators works does not change that. I'm not
    complaining about the functions themselves, only about the help text.

    -- Jay
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,280
    Likes Received:
    38
    On a related note, I'd suggest doing a global search-and-replace for yyyy-www-d and replacing it with yyyy-Www-d (i.e. uppercase the first W to indicate that it is a literal letter W, not a placeholder for a digit.)
     

Share This Page