Skip to main content
Skip table of contents

Filter Query: Date Range Filter

Show content modified in December 2020.

JSON
// USING EXACT DATES
{
	"kind": "DateRangeFilter",
	"field": "audit.modificationDate",
	"range": { 
		"names": { 
			"fieldId.en":"Dec 2020",
			"fieldId.de":"Dez 2020"
		},
		"from": "2020-12-01T00:00:00.000",
		"to": "2020-12-31T00:00:00.000",
	}
}

Show content with a publish date in the last 30 days.

JSON
// USING DAY CALCULATIONS
{
	"kind": "DateRangeFilter",
	"field": "corporateInformation.publishDate",
	"range": { 
		"names": { 
			"fieldId.en":"Last 30 days"
			"fieldId.de":"Letzte 30 Tage"
		},
		"from": "now-30D",
		"to": "now"
	}
JSON
// USING COMBINATIONS
{
	"kind": "DateRangeFilter",
	"field": "corporateInformation.embargoDate",
	"range": { 
		"names": { 
			"fieldId.en":"Last 30 days"
			"fieldId.de":"Letzte 30 Tage"
		},
		"from": "now-30D",
		"to": "now"
	},
	{ 
		"names": { 
			"fieldId.en":"Last fiscal year"
			"fieldId.de":"Last fiscal year"
		},
		"from": "2019-03-31T01:02:02.000",
		"to": "2020-03-31T01:02:02.000"
	}
}

Picturepark supports

  • Y (years), M (month), D (days), H (hours), m (minutes)

  • Calculations starting with now e.g. now+30D, now-30D

  • Anchor dates and rounding are not supported (e.g. Jun 5th + 30d; now/M for the current month)

Basic Filter

Only content with a date/date-time value in the specified range.

Date Format: YYYY-MM-DDTHH:MM:SS:MMM

  • Year-Month-DayTHour-Minute-Second-Millisecond

JSON
{
	"kind": "DateRangeFilter",
	"field": "fieldpath",
	"range": { 
		"names": { 
			"fieldId.en":"english text shown to the user",
			"fieldId.de":"german text shown to the user"
		},
		"from": "YYYY-MM-DDTHH:MM:SS:MMM",
		"to": "YYYY-MM-DDTHH:MM:SS:MMM",
	}
}

Properties

kind

Discriminator, string, required

field

The field's name to execute the filter on. It is composed of the field ids of the hierarchy joined with "." (i.e. personLayer.address.street), check DateTime field values

range

If no range provided, the filter will throw an error "query execution failure" and display it as empty. 

names

The translations of the ranges are nullable, language-specific range names

from

it can be a date-time string or a pattern: now(+-)(int)(YMDHm).

to

it can be a date-time string or a pattern: now(+-)(int)(YMDHm).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.