Tip #1440: Relative dates in sample data

We all enjoy flexing our Dataverse or Dynamics 365 skills from time to time. Many of us have meticulously crafted a demo instance from proverbial stone and blood. However, one of the challenges is keeping the data up-to-date. There’s nothing worse than displaying 20 tasks that are all overdue by four months. Fortunately, Dataverse offers a fantastic feature that allows us to modify data during import! Grab yourself a cuppa, blanket, comfortable horizontal surface and dive in: Add transformation mappings for import (Microsoft Dataverse) – Power Apps | Microsoft Learn.

Screenshot of an Excel spreadsheet. Selected cell has the following formula in it: NOW() + 14.

Alternatively, you can simply use an Excel file with formulas while following the instructions: Import or export data from Microsoft Dataverse – Power Apps | Microsoft Learn. Boing!

For fancier, more modern transformations you may want to look into Importing using a connector and Power Query.

 #"Added Two Weeks" = Table.ReplaceValue(
    #"Changed column type",
    each [Due Date], 
    each DateTime.From([Due Date]) + #duration(14,0,0,0), 
    Replacer.ReplaceValue, {"Due Date"})

Leave a Reply

Your email address will not be published. Required fields are marked *