This article describes how to go from an aggregated Date/Time variable...
...to a dynamic R variable where you can change the category labels:
Requirements
A Date/Time variable. In this example we have a date variable called StartDate which has been aggregated to 1 Quarter.
Method
1. Hover over any variable in the Data Sources tree > Plus (+) > Custom Code > R - Numeric or in the toolbar select Anything > Data > Variables > New > Custom Code > R - Numeric.
2. Paste the below in the code editor:
attr(StartDate,"QDate")
This code uses the attr function to pull the aggregated QDate label from our StartDate variable.
3. Update the Name and Label on the object inspector under General > General.
4. Change Data > Properties > Structure to Nominal: Mutually exclusive categories.
5. Go to Data > Properties > Data Values > Labels and update any labels as required.
6. Press OK.
Note, when your source data updates, this variable will update accordingly and any new aggregated categories will automatically be added.
Next
How to Work with Date Ranges Using R
How to Easily Convert Strings to Times and Dates in R with flipTime
How to Work with R in Displayr