Newer Version Available
Dates in XMD
Specify date conventions for Analytics dashboards and lenses.
1"dates" : [
2 {
3 "alias" : "Order_Date",
4 "label" : "Order Date",
5 "firstDayOfWeek" : -1,
6 "fiscalMonthOffset":0,
7 "fields" : {
8 "day" : "Order_Date_Day",
9 "epochDay" : "Order_Date_day_epoch",
10 "epochSecond" : "Order_Date_sec_epoch",
11 "fullField" : "Order_Date",
12 "hour" : "Order_Date_Hour",
13 "minute" : "Order_Date_Minute",
14 "month" : "Order_Date_Month",
15 "quarter" : "Order_Date_Quarter",
16 "second" : "Order_Date_Second",
17 "week" : "Order_Date_Week",
18 "year" : "Order_Date_Year"
19 }
20 },
21 {
22 "alias" : "Ship_Date",
23 "label" : "Ship Date",
24 "firstDayOfWeek" : -1,
25 "fiscalMonthOffset":0,
26 "fields" : {
27 "day" : "Ship_Date_Day",
28 "epochDay" : "Ship_Date_day_epoch",
29 "epochSecond" : "Ship_Date_sec_epoch",
30 "fullField" : "Ship_Date",
31 "hour" : "Ship_Date_Hour",
32 "minute" : "Ship_Date_Minute",
33 "month" : "Ship_Date_Month",
34 "quarter" : "Ship_Date_Quarter",
35 "second" : "Ship_Date_Second",
36 "week" : "Ship_Date_Week",
37 "year" : "Ship_Date_Year"
38 }
39 }
40],The dates section can have the following
parameters.
| Parameter | Description |
|---|---|
| alias | Identifier (API name) for the dataset field used to generate the date part fields in the dataset. For example, Order_Date generates Order_Date_Month and Order_Date_Minute. |
| fields |
Array of the date part fields, like CloseDate_Day, CloseDate_Year, and CloseDate_Hour. You must specify all date parts. If fiscalMonthOffset is set in the dataflow or XMD file for CSV data, you must also specify fiscal date parts, like CloseDate_Week_Fiscal. To specify a date part, use the format <date_field_name>_<date_part>. For example, for the week date part for the CloseDate field, enter CloseDate_Week. |
| firstDayOfWeek | This parameter is deprecated at the dataset level. You can set this property in the sfdcDigest transformation for Salesforce data or in the metadata (schema) file for CSV uploads (using the UI or External Data API). |
| fiscalMonthOffset | This parameter is deprecated at the dataset level. You can set this property in the sfdcDigest transformation for Salesforce data or in the metadata (schema) file for CSV uploads (using the UI or External Data API). |
| label |
Display name for the dataset field, up to 40 characters. Example: "label": "Closing Date" |
For more information about date parts and the first day of the week, see Date Handling in Datasets.