-
Notifications
You must be signed in to change notification settings - Fork 5
DateInfo
David Rivard edited this page Dec 30, 2020
·
1 revision
This API is used to provide useful information about a given date.
Input Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| Date | DateTime | Date to analyze | X |
Output Properties
| Property | Type | Description |
|---|---|---|
| Year | Integer | Year in integer format |
| Month | Integer | Month in integer format |
| Day | Integer | Day of the month in integer format |
| DayOfYear | Integer | Day of the year in integer format |
| DayOfWeek | Integer | Day of week in integer format (Sunday = 0) |
| IsLeapYear | Boolean | Is the date part of a leap year |
| IsLastDayOfMonth | Boolean | Is the date last day of the month |
Request
https://{{baseurl}}/api/data/v9.1/driv_DateInfo
{
"Date" : "2020-12-25"
}
Response
{
"@odata.context": "https://{{baseurl}}/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.driv_DateInfoResponse",
"Year": 2020,
"Month": 12,
"Day": 25,
"DayOfYear": 360,
"DayOfWeek": 5,
"IsLeapYear": true,
"IsLastDayOfMonth": false
}