Date Operations
incrementDateField
You can use this service to increment the number of days in an input date. For example:
- String "2022-02-21" with format "yyyy-MM-dd" and days 1 → returns "2022-02-22"
- String "2022-02-21 08:44:22" with format "yyyy-MM-dd hh:mm:ss" and days 1 → returns "2022-02-22 08:44:22"
URL:
https://api.rightwave.net/rdn/api/ss/incrementDateField?str_input_date={Marketo token for str_input_date}&input_format={Marketo token for input_format}&int_numberOfDays={Marketo token for int_numberOfDays}
Headers:
| Key Name | Value | Description |
|---|---|---|
| auth-key | 5wt-be28f07942848582b5915443 | Use for authentication |
| Content-Type | application/json | Header for Content-Type |
Query Parameters:
| Parameter Name | Data Type | Description |
|---|---|---|
| str_input_date | String | First date for incrementDateField |
| input_format | String | Second input for incrementDateField |
| int_numberOfDays | Integer | Third input for incrementDateField |
Output:
{
"success": true,
"input": {
"str_input_date": "2022-02-21 08:44:22",
"input_format": "yyyy-MM-dd hh:mm:ss",
"int_numberOfDays": "1"
},
"result": {
"output": "2022-02-22 08:44:22"
},
"requestId": "21666880273355791"
}
Example:
curl -X GET \
-H 'Content-Type: application/json' \
-H 'auth-key: 5wt-be28f07942848582b59154453' \
"https://api.rightwave.net/rdn/api/ss/incrementDateField?str_input_date=2022-02-21 08:44:22&input_format=yyyy-MM-dd hh:mm:ss&int_numberOfDays=1"
decrementDateField
You can use this service to decrease the number of days in an input date. For example:
- String "1992-05-10" with format "yyyy-MM-dd" and days 1 → returns "1992-05-09"
- String "1992-05-10 06:44:22" with format "yyyy-MM-dd hh:mm:ss" and days 1 → returns "1992-05-09 06:44:22"
URL:
https://api.rightwave.net/rdn/api/ss/decrementDateField?str_input_date={Marketo token for str_input_date}&input_format={Marketo token for input_format}&int_numberOfDays={Marketo token for int_numberOfDays}
Headers:
| Key Name | Value | Description |
|---|---|---|
| auth-key | 5wt-be28f07942848582b5915443 | Use for authentication |
| Content-Type | application/json | Header for Content-Type |
Query Parameters:
| Parameter Name | Data Type | Description |
|---|---|---|
| str_input_date | String | First input for decrementDateField |
| input_format | String | Second input for decrementDateField |
| int_numberOfDays | Integer | Third input for decrementDateField |
Output:
{
"success": true,
"input": {
"str_input_date": "1992-05-10 06:44:22",
"input_format": "yyyy-MM-dd hh:mm:ss",
"int_numberOfDays": "1"
},
"result": {
"output": "1992-05-09 06:44:22"
},
"requestId": "21666961639143640"
}
Example:
curl -X GET \
-H 'Content-Type: application/json' \
-H 'auth-key: 5wt-be28f07942848582b59154453' \
"https://api.rightwave.net/rdn/api/ss/decrementDateField?str_input_date=1992-05-10 06:44:22&input_format=yyyy-MM-dd hh:mm:ss&int_numberOfDays=1"
compareDate
You can use this service to compare two date fields. For example:
- date1 "2022-01-21" vs date2 "2022-02-21" with format "yyyy-MM-dd" → returns
true(date1 is before date2) - date1 "2022-02-21" vs date2 "2022-02-21" → returns
false(same date)
URL:
https://api.rightwave.net/rdn/api/ss/compareDate?str_input_date_1={Marketo token for str_input_date_1}&str_input_date_2={Marketo token for str_input_date_2}&input_format={Marketo token for input_format}
Headers:
| Key Name | Value | Description |
|---|---|---|
| auth-key | 5wt-be28f07942848582b5915443 | Use for authentication |
| Content-Type | application/json | Header for Content-Type |
Query Parameters:
| Parameter Name | Data Type | Description |
|---|---|---|
| str_input_date_1 | String | First input for compareDate |
| str_input_date_2 | String | Second input for compareDate |
| input_format | String | Third input for compareDate |
Output:
{
"success": true,
"input": {
"str_input_date_1": "2022-01-21 06:44:22",
"str_input_date_2": "2022-02-21 08:44:22",
"input_format": "yyyy-MM-dd hh:mm:ss"
},
"result": {
"output": true
},
"requestId": "21666962454956172"
}
Example:
curl -X GET \
-H 'Content-Type: application/json' \
-H 'auth-key: 5wt-be28f07942848582b59154453' \
"https://api.rightwave.net/rdn/api/ss/compareDate?str_input_date_1=2022-01-21 06:44:22&str_input_date_2=2022-02-21 08:44:22&input_format=yyyy-MM-dd hh:mm:ss"
calculateAge
You can use this service to calculate age on the basis of date of birth. For example, You have a variable named dateOfBirth with value "1992-05-01" and format "yyyy-MM-dd". The API will return integer value 30.
URL:
https://api.rightwave.net/rdn/api/ss/calculateAge?userinput={Marketo token for userinput}&input_format={Marketo token for input_format}
Headers:
| Key Name | Value | Description |
|---|---|---|
| auth-key | 5wt-be28f07942848582b5915443 | Use for authentication |
| Content-Type | application/json | Header for Content-Type |
Query Parameters:
| Parameter Name | Data Type | Description |
|---|---|---|
| str_input_date | String | First input for calculateAge |
| input_format | String | Second input for calculateAge |
Output:
{
"success": true,
"input": {
"str_input_date": "1992-05-01",
"input_format": "yyyy-MM-dd"
},
"result": {
"output": 30
},
"requestId": "21666963338566488"
}
Example:
curl -X GET \
-H 'Content-Type: application/json' \
-H 'auth-key: 5wt-be28f07942848582b59154453' \
"https://api.rightwave.net/rdn/api/ss/calculateAge?str_input_date=1992-05-01&input_format=yyyy-MM-dd"
Was this page helpful?