Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-15690

Suggestion to improve documentation on STD.Date.FromStringToDate

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.x
    • Fix Version/s: 6.0.x
    • Component/s: Documentation
    • Labels:
      None

      Description

      I was working with the STD.Date.FromStringToDate function yesterday. The online specs are great (https://hpccsystems.com/download/documentation/standard-library-reference/html/FromStringToDate.html), but I think adding some different examples would make the capacities of the function more understandable.

      Currently there:

      Example:
      IMPORT STD;

      D1 := STD.Date.FromStringToDate('19720607', '%Y%m%d');
      //D1 contains 19720607
      D2 := STD.Date.FromStringToDate('19720007', '%Y%m%d');
      //D2 contains 0
      I would suggest adding some examples that require slightly more sophisticated translation, such as…

      D3 := STD.Date.FromStringToDate(‘10/29/1974’, ‘%m/%d/%Y’);
      //D3 contains 19741029
      D4:= STD.Date.FromStringToDate(‘29/4/1970’, ‘%d/%m/%Y’);
      //D4 contains 19700429

        Attachments

          Activity

            People

            • Assignee:
              jamesdefabia Jim DeFabia
              Reporter:
              djkuzma74 David Kuzma
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: