General calendar
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
Settings
Want to learn more?
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) = Formeloperator 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)