Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Data type inference more accurately recognizes Datetime values based on locale settings.
  • Suggestion cards containing Datetime transformations and example previews utilize locale settings.
  • Number of weeks in the year may vary. For example, the WEEKNUM function calculated on the last few dates of the calendar year may return different values depending on the locale where the calculation is performed:

    Info

    NOTE: The output calculations for number of weeks may vary between browser,

    D s photon
    , and the running environment where the job may be executed, based upon locale.


    • EN-US: Maximum of 52 weeks

    • ISO 8601: Maximum of 53 weeks
    • You can add steps similar to the following, which adds a 53rd week as a possible output for WEEKNUM:

      D lang syntax
      RawWrangletrue
      Typesyntax
      showNotetrue
      WrangleTextderive type: single value: dateformat(date(year(myDate), 1, 1), 'yyyy\/MM\/dd') as: 'NewYearsDayforMyYear'

      derive type: single value: dateformat(date(year(myDate), 1, 1), 'yyyy\/MM\/dd') as: 'NewYearsDayforMyYear'


      D lang syntax
      RawWrangletrue
      Typesyntax
      showNotetrue
      WrangleTextderive type: single value: if(datedif(NewYearsDayforMyYear, myDate, day) > (52 * 7), 53, weeknum(myDate)) as: 'weekNumforMyDate'

      derive type: single value: if(datedif(NewYearsDayforMyYear, myDate, day) > (52 * 7), 53, weeknum(myDate)) as: 'weekNumforMyDate'