Skip to main content

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 NameValueDescription
auth-key5wt-be28f07942848582b5915443Use for authentication
Content-Typeapplication/jsonHeader for Content-Type

Query Parameters:

Parameter NameData TypeDescription
str_input_dateStringFirst date for incrementDateField
input_formatStringSecond input for incrementDateField
int_numberOfDaysIntegerThird 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 NameValueDescription
auth-key5wt-be28f07942848582b5915443Use for authentication
Content-Typeapplication/jsonHeader for Content-Type

Query Parameters:

Parameter NameData TypeDescription
str_input_dateStringFirst input for decrementDateField
input_formatStringSecond input for decrementDateField
int_numberOfDaysIntegerThird 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 NameValueDescription
auth-key5wt-be28f07942848582b5915443Use for authentication
Content-Typeapplication/jsonHeader for Content-Type

Query Parameters:

Parameter NameData TypeDescription
str_input_date_1StringFirst input for compareDate
str_input_date_2StringSecond input for compareDate
input_formatStringThird 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 NameValueDescription
auth-key5wt-be28f07942848582b5915443Use for authentication
Content-Typeapplication/jsonHeader for Content-Type

Query Parameters:

Parameter NameData TypeDescription
str_input_dateStringFirst input for calculateAge
input_formatStringSecond 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"