Timestamp Data FBFs

The Timestamp fields can be used to derive new fields and data from, by using the following Field Build Functions:

hour_of_day_from_timestamp_seconds

FunctionDescriptionSourcesOutputArguments
hour_of_day_from_timestamp_secondsReturns the hour of the day (UTC) from the given timestamp.timestamp_value
(type: Number)
{
  "hour_of_timestamp": {
    "type": "numeric",
    "function": "hour_of_day_from_timestamp_seconds",
    "source": "source_name"
  }
}
<EXAMPLE INPUT>
{
  "source_name": 1610569800
}
<EXAMPLE OUTPUT>
{
  "hour_of_timestamp": 20
}

day_of_week_from_timestamp_seconds

FunctionDescriptionSourcesOutputArguments
day_of_week_from_timestamp_secondsReturns the day of week (UTC) from the given timestamp.timestamp_value
(type: Number)
{
  "day_of_timestamp": {
    "type": "string",
    "function": "day_of_week_from_timestamp_seconds",
    "source": "source_name"
  }
}
<EXAMPLE INPUT>
{
  "source_name": 1610569800
}
<EXAMPLE OUTPUT>
{
  "day_of_timestamp": "Wednesday"
}

month_from_timestamp

FunctionDescriptionSourcesOutputArguments
month_from_timestampA directive to get the month of the year of a given timestamp.timestamp_value
(type: Number)
Number
{
  "month_in_number": {
    "type": "numeric",
    "function": "month_from_timestamp",
    "source": "source_name"
  }
}
<EXAMPLE INPUT>
{
  "source_name": 1610569800
}
<EXAMPLE OUTPUT>
{
  "month_in_number": 1
}

season_from_timestamp

FunctionDescriptionSourcesOutputArguments
season_from_timestampA directive to get the season of the year of a given timestamp.timestamp_value
(type: Number)
is_northern_hemisphere

{
  "season_of_timestamp_north": {
    "type": "string",
    "function": "season_from_timestamp",
    "source": "source_name",
    "args": [
      true
    ]
  },
  "season_of_timestamp_south": {
    "type": "string",
    "function": "season_from_timestamp",
    "source": "source_name",
    "args": [
      false
    ]
  }
}
<EXAMPLE INPUT>
{
  "source_name": 1610569800
}
<EXAMPLE OUTPUT>
{
  "season_of_timestamp_north": "winter",
  "season_of_timestamp_south": "summer"
}

timestamp_delta_days

FunctionDescriptionSourcesOutputArguments
timestamp_delta_daysA directive for calculating days delta of two timestamps (provided in
seconds/millis).
first_timestamp
(type: Optional[Number])

second_timestamp
(type: Optional[Number])
Optional[Number]default_value

{
  "delta_of_timestamps_in_days": {
    "type": "numeric",
    "sources": [
      "primary_source",
      "secondary_source"
    ],
    "function": "timestamp_delta_days"
  }
}
<EXAMPLE INPUT>
{
  "primary_source": 1613334600,
  "secondary_source": 1613248200
}
<EXAMPLE OUTPUT>
{
  "delta_of_timestamps_in_days": 1
}