Skip to main content

dayOfWeek / dayOfMonth / dayOfYear / monthOfYear / year
dayOfWeek / dayOfMonth / dayOfYear / monthOfYear / year

This article explains how you can create date expressions to retrieve a required value from a date instance, including dayOfWeek / dayOfMonth / dayOfYear / monthOfYear / year.

The expressions discussed in this section are used by Rainbird to retrieve a required value from a date instance that has been created at runtime or that exists in the map.

Click on one of the expressions below for information on how to use the expression and an example model using each expression: 

  • dayOfWeek: determines the day of the week as a numerical value (1-7, with Monday = 1, Tuesday = 2 etc)
  • dayOfMonth: extracts the day value from a date (e.g. Rainbird would extract 12 if the date instance was 12th of February 2021)
  • dayOfYear: counts the number of days a date is into a year (e.g. Rainbird would count 43 days if the date instance was 12th of February 2021)
  • monthsOfYear: determines the month of the year as a numerical value (1-12, with January = 1, February =2 etc)
  • year: extracts the year from a date (e.g. Rainbird would extract 2021 if the date instance was 12th of February 2021)
  • dayOfWeek / dayOfMonth / dayOfYear / monthOfYear / year - Downloadable Model
0 followers
0 questions
0 posts

You will need to register to be able to post or comment on a topic.  

dayOfWeek / dayOfMonth / dayOfYear / monthOfYear / year - Downloadable Model

When viewing the knowledge map generated by the .rbird file below, please see the list below for which query you will need to run to see each date expression in action:

  • dayOfWeek - 'wants to know day of week... (More)

year - Example Map Part 2: Creating The year Rule and Running The Query

Building the rule

Now that we have set up the map’s concepts and relationships, we can build the rule which the year expression will sit in. The rule will be built on the ‘wants to know year’ relationship and... (More)

year - Example Map Part 1: Creating Concepts & Relationships

Creating Concepts & Relationships

First, create the following concepts:

  • 1 string concept – ‘Person’
  • 1 date concept – ‘Date’
  • 1 number concept – ‘Year’ (you could also use a string concept to return the same result, but a string... (More)

monthOfYear - Example Map Part 2: Creating The monthOfYear Rule and Running The Query

Building the rule

Now that we have set up the map’s concepts and relationships, and have built facts, we can build the rule on the relationship ‘wants to know month of year‘. The rule will be built... (More)

.menu.bell.icon {color: #1c083b;}