Convert date and time value to specified time zone
The “World Time” action converts date and time values between two time zones.
Date and time conversions are a fundamental part of many applications, especially for organizations that have locations or customers across the country or around the globe. But they are hard to get right and often involve complex expressions and syntax that looks a lot like custom code.
The “World Time” action in PowerTools makes it easy to convert dates and times into any time zone. Simply provide a date and select a target time zone from anywhere on the globe. Done! You can even supply your own formatting string if you wish to get just the right output you are looking for.
Parameters
Title
Name
Type
Description
Value
input
date/time
Source date and time
Source
source
string
Source time zone
Target
target
string
Target time zone
Format
format
string
Formatting string
Response
Status
Title
Name
Type
Description
Success
Result
result
string
Formatted date string
Failure
Result
result
string
Error description
Integrate the "World Time" function into a workflow or app with the platform of your choice:
How to convert date and time value to specified time zone with Microsoft Power Apps
Instructions
Add the PowerTools connector from the Data menu.
In the formula for the control, variable or element, type “ApptigentPowerTools.CountCollection().result”. Within the parentheses, enter the field, control or variable that contains the source collection.
How to convert date and time value to specified time zone with Salesforce
Instructions
Drag and drop a new action onto the design surface. Edit the action and choose PowerTools from the category menu on the left.
Click in the “Action” search box, scroll through the action list and choose “DateTime – World Time”. Insert the necessary values or variables in each input field. (Note: Click the “Advanced” link to manually assign output variables to the action results)
How to convert date and time value to specified time zone with another Platform or Custom Code
Instructions
If your platform is not listed and it supports Open API (Swagger) extensions, import the API Definition document from the Developer Edition product on our Customer Portal at https://portal.apptigent.com/product (look for the Open API link at the top of the PowerTools Developer API definition page). Invoke the desired actions in your app or workflow design tool, supplying values for the listed parameters. Refer to the developer documentation on the Customer Portal for details on input and output formats.
If you are developing a custom app, execute a RESTful POST operation to the /CountCollection endpoint in your application code or use the pre-generated client scaffolding from our Github repo at https://github.com/apptigent/powertools. Be sure to include your API Key (Client ID) in the header using the “X-IBM-Client-Id” key/value pair. The body should be a well-formed JSON object with the parameter label(s) and value(s) in the specified format. Refer to the API documentation at https://portal.apptigent.com for more information.
Example
const request = require('request');
const options = {
method: 'POST',
url: 'https://connect.apptigent.com/api/utilities/WorldTime',
headers: {
'X-IBM-Client-Id': 'REPLACE_THIS_KEY',
'content-type': 'application/json',
accept: 'application/json'
},
body: {
input: '03/10/2010 09:00:00',
source: 'GMT Standard Time - (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London',
target: 'Central Standard Time - (GMT-06:00) Central Time (US & Canada)',
format: 'yyyy-MM-dd HH:mm:ss'
},
json: true
};
request(options, function (error, response, body) {
if (error) thrownewError(error);
console.log(body);
});
Ask our AI support assistant your questions about our platform, features, and services.
You are offline
What can I help you with?
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.