Summary

Adds a column to the table that contains calendar information such as weekday, month, year, day of the week, week of year in predefined or user-defined formats or  (see date and time formats in Formatting strings).

The operator requires at least one column of the data type Date/Time.

Configuration

Input settings of existing table

Name

Value

Opt.

Description

Example

From

System.DateTime

-

This column contains the reference date/time for the calendar information.

-

Settings

Name

Value

Opt.

Description

Example

Name of the result column

System.String

-

Name of the column to which the calendar information is saved

-

Year

System.Boolean

-

Adds the year to the calendar information, formatted to yyyy

-

Month

System.Boolean

-

Adds the month to the calendar information, formatted to MM

-

Quarter

System.Boolean

-

Adds the quarter to the calendar information, either of 1, 2, 3, or 4

-

Day

System.Boolean

-

Adds the day of the month to the calendar information, formatted to dd

-

Weekday

System.Boolean

-

Adds the weekday number n and weekday name to the calendar information, formatted to ndddd

-

Weekday (abbreviation)

System.Boolean

-

Adds the weekday to the calendar information, formatted to ddd

-

Weekday - identifier

System.Boolean

-

Adds the weekday to the identifier text.

-

Weekday (nth day in month)

System.Boolean

-

Adds the weekday and the n-th occurrence of the weekday in the respective month to the calender information, formatted to n;dddd

-

Calendar day

System.Boolean

-

Adds the calendar day (n-th day of the year) to the calendar information.

-

Calendar week

System.Boolean

-

Adds calendar week to the calendar information.

-

Calendar week rule

System.String

  • 1st day
  • First four day week
  • First full week

-

Defines the calendar week rule to be applied.

  • 1st day: First week of the year is the week containing the 1st day of the year.
  • First four day week: First week of the year is the first week containing at least 4 days of the new year.
  • First full week: First week of the year is the first full week of the new year.

-

Free format

System.String

opt.

User-defined string with calendar information given one of the date/time formats in Formatting strings.

-

Want to learn more?

Screenshot

Examples

Example: Get information to specific days

Situation

In this example we habe a column "Date" but we want more details to the specific days

Settings

Result

Project File

-

Example: Only one date column

Situation

Settings

Result


Project File

-

Troubleshooting

Free format

  • The symbol for day is d.
  • The symbol for month is M.
  • The symbol for minute is m.
  • The symbol for two-digit year is yy.

For more information on formatting please refer to Grundbegriffe Formate

Performance Issues

Day of week

use Formula operator (row-by-row) (5.0) with following code snippet for a better performance:

((int)#Von#.DayOfWeek == 1) ? "1;Montag" :
((int)#Von#.DayOfWeek == 2) ? "2;Dienstag" :
((int)#Von#.DayOfWeek == 3) ? "3;Mittwoch" :
((int)#Von#.DayOfWeek == 4) ? "4;Donnerstag" :
((int)#Von#.DayOfWeek == 5) ? "5;Freitag" :
((int)#Von#.DayOfWeek == 6) ? "6;Samstag" : "7;Sonntag"

Related topics

  • Operators (alphabetical overview)
  • For performance reasons it might be interesting to use a formula operator. 
  • Some things are straight forward #From#.ToString("HH:mm")
  • Other are more complex:
    new System.Globalization.GregorianCalendar().GetWeekOfYear(System.DateTime.Now,
      System.Globalization.CalendarWeekRule.FirstFourDayWeek, System.DayOfWeek.Monday)