Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  1. Fotoware Alto
    • 11.14 Schreckhorn
    • Terminology
    • Solutions
    • User Guide - Deutsch
    • User Guide - English
    • API Changelog
  2. Fotoware Veloz
    • Managing users and groups
    • Configuring archives
    • Configuring workflows
    • Configuring site behavior
    • Navigating and searching to find your assets
    • Working with your assets
    • Editing asset metadata
    • Uploading files
    • Version Control in Fotoware
    • Albums - Creating and sharing collections
    • Placing assets in a CMS
    • Working with the Fotoware Pro interface
    • Using the Fotoware plugins
    • Consent management
    • User guide to FotoWeb for iPad (Legacy)
    • Picture conferencing with FotoWeb Screens (Legacy)
    • What's what in Fotoware
    • GDPR
    • Fotoware Veloz releases
    • Activity Exports
    • Fotoware Example Workflows
  3. Fotostation
    • Getting started with Fotostation
    • Viewing, selecting and sorting files
    • Managing your assets with archives
    • Adding metadata to assets
    • Searching for assets
    • Working with your assets
    • Version Control in Fotostation
    • Automating tasks with Actions
    • Configuring metadata fields and editors
    • Configuring Fotostation
    • Configuring Fotostation for multi-user environments
    • Troubleshooting Fotostation
  4. Fotoware Flow
    • What is Flow?
    • Getting started
    • Flow dictionary
  5. Fotoware On-Premises
    • Getting started
    • Index Manager
    • FotoWeb
    • Color Factory
    • Connect
    • Operations Center Guide
  6. Integrations and APIs
    • The Fotoware API
    • Creating integrations using embeddable widgets
    • Authorizing applications using OAuth
    • Auto-tagging
    • FotoWeb Drag and Drop export
    • Integration using webhooks
    • Optimizely and Episerver plugin documentation
    • User Interface Integrations
  7. Fotoware Mobile
    • User guide for Fotoware Mobile for iPhone and Android
    • User guide to FotoWeb for iPad (Legacy)
    • User guide to FotoWeb for iPhone and Android (Legacy)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support

Table of Contents

Benefits of this transformation Specific Definitions Date Manipulation based on XMP CreationDate
  • Home
  • Fotoware Alto
  • 11.14 Schreckhorn
  • Business Rule Automation
  • Transformations in Business Rules

Date Math Transformation

03. March 2025

Elaine Foley

Table of Contents

Benefits of this transformation Specific Definitions Date Manipulation based on XMP CreationDate

The DateMathTransformation allows us to pick a value from a variable and add/subtract something to it.

The Date Math Transformation feature in our Business Rule Configuration represents a powerful tool that automates data manipulation and optimization. It's an incredibly versatile feature that enables you to add or subtract a specific interval from a date field in your data sources, for example adding 10 years to the creation date of a content item.

Common use cases include:

  1. Forecasting and Planning: Businesses can leverage this feature to perform long-term forecasting and strategic planning. For instance, a company with long-term contracts or assets that last several years could use this feature to automatically generate expected expiration or renewal dates.
  2. Automated Content Management: Media companies or those with extensive digital asset libraries can use this feature for automated content management. Adding a fixed number of years to the creation date could help in defining content lifecycle and planning for updates or archiving.
  3. Regulatory Compliance: Many industries are regulated with strict guidelines regarding data retention periods. Adding a certain number of years to a document's creation date can assist in automatically managing these data retention requirements, helping companies maintain compliance with less manual effort.

The DateMathTransformation is a transformation in the Business Rule configuration which allows for automated manipulation of date data types. It specifically enables you to add or subtract a specified interval from a date.

Benefits of this transformation

  • Efficiency: Saving valuable time, eleminating the need for manual date manipulations and minimize human errors.
  • Consistency: Ensuring consistent date manipulation to maintain data integrity and consistency, vital for data analysis and reporting, as well as decision making.
  • Scalability: Scaling data manipulations, ensuring that increased data volume won’t affect the business ability to perform calculations.

Specific Definitions

Property Value
kind DateMathTransformation
timeSpan In the format "days.hours:minutes:seconds", here "365”

Date Manipulation based on XMP CreationDate

This code allows you to take the date from the createDate field in xmpMetadata and add 10 years to it.

  1. The condition key allows you to specify conditions. In this example, the Content Schema condition is null, which means the Business Rule executes for all Content Types (images, videos etc. ) without further refinement (ContentSchemaCondition with null schemaId).
  2. The transformationGroups array contains transformations to be applied on specified inputs. In this case, it extracts the createDate from xmpMetadata and applies DateMathTransformation on it.
  3. The DateMathTransformation object requires a timeSpan to be specified in the format "days.hours:minutes:seconds". Here, "365

You can also use the variable $$utcNow$$ as input.

 
{
    "kind": "BusinessRuleConfigurable",
    "condition": {
        "kind": "ContentSchemaCondition",
        "schemaId": null,
        "traceRefId": null,
        "names": {},
        "description": {}
    },
    "transformationGroups": [
        {
            "inputs": [
                "$$metadata$$"
            ],
            "transformations": [
                {
                    "kind": "TakeDictionaryValueTransformation",
                    "key": "xmpMetadata",
                    "traceRefId": null,
                    "names": {},
                    "description": {}
                },
                {
                    "kind": "TakeDictionaryValueTransformation",
                    "key": "xmp",
                    "traceRefId": null,
                    "names": {},
                    "description": {}
                },
                {
                    "kind": "TakeDictionaryValueTransformation",
                    "key": "createDate",
                    "traceRefId": null,
                    "names": {},
                    "description": {}
                },
                {
                    "kind": "DateMathTransformation",
                    "timeSpan": "3650.00:00:00",
                    "traceRefId": null,
                    "names": {},
                    "description": {}
                }
            ],
            "storeIn": "creationDatePlus10years",
            "traceRefId": null,
            "names": {},
            "description": {}
        }
    ],
    "actions": [
        {
            "kind": "AssignLayerAction",
            "layerId": "RegulatoryCompliance",
            "defaultValues": {
                "dateField": "$creationDatePlus10years$"
            },
            "traceRefId": null,
            "names": {},
            "description": {}
        }
    ],
    "id": "add10YearsToXmpCreationDate",
    "triggerPoints": [
        {
            "executionScope": "MainDoc",
            "documentType": "Content",
            "action": "Create"
        }
    ],
    "isEnabled": true,
    "names": {
        "en": "Add 10 years to xmp creation date",
        "x-default": "Add 10 years to xmp creation date"
    },
    "description": {},
    "enableTracing": false
}
math conversion date calculation

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Display Pattern: Date Time
  • Search: Find Items with Date in Range
  • Field Value Changed Condition
  • Take Array Value Transformation
eco-lighthouse-miljøfyrtårn

Company

  • About us
  • Resellers
  • Careers
  • Contact us

Help & support

  • Support center
  • Consultancy
  • Tech partners
  • Fotostation
  • System status

Trust Center

  • Legal
  • Security
  • Sustainability & ESG

Locations

Fotoware AS (HQ)
Tollbugata 35
0157 OSLO
Norway
FotoWare Switzerland AG
Industriestrasse 25
5033 Buchs (AG)
Switzerland

Copyright 2025 Fotoware All rights reserved.

  • Terms of service
  • Privacy policy
  • Cookie policy

Knowledge Base Software powered by Helpjuice

Expand