Datetime is one of the most complex primitive data types which one needs to understand while working with the transformation in APPSeCONNECT. This article will help you understand how we can make use of the Datetime field efficiently and effectively such that all the destination data is compatible.
Do you have multiple systems running? Connect all your business applications under one single platform to automate the business process and increase your productivity and efficiency!
Steps to define the DateTime field
A DateTime is an inherent property of a particular attribute of a schema. The attribute can be a source attribute or a target attribute. By source schema, we mean the schematic definition of the data that an application interacts with. APPSeCONNECT supports different primitive data types in addition to DateTime. To define the DateTime field in a schema, we need to first create an attribute on that particular schema. To do such a thing, please follow the steps mentioned below :
- Open portal.appseconnect.com
- Go to App Section and click on the Schema of a particular Application.
- You can add a new Schema from there, which will allow you to define a schema for a particular endpoint
- You can add as many fields as you want, each attribute will have its type. (DateTime for instance).
Also Check out: Integrating Business Applications – 5 Key Points to Consider
Once the date is mentioned on a particular schema, you can use it to store the DateTime during transformation. You can read the documentation to know more on how to add or import schema in APPSeCONNECT.
The transformation allows you to pick a particular field, do execute a logic that you define per field, and then create a separate document. The transformation lets you define the fields that you want to expose to the target document, such that you can push the document easily. Now while defining transformation, you might need some tooling that you want to execute on a DateTime field to get proper results. Let us discuss how to do such a thing using the APPSeCONNECT transformation engine.
Some common methods to transform the DateTime field:
|Get date or a default date
|The idea is to generate default data if there is no data present for a particular mapping
|Format date or a default date
|This mapping will reformat the data using a format specifier or else will return a dummy date specified as the third parameter.
|Get reformatted Local or UTC DateTime
|[genericlib:GetLocalTime(format)] / [genericlib:GetUniversalDateTime(format)]
|This mapping will just get the current DateTime or current Universal DateTime and reformat the data using a format specifier.
|Gets a local or UTC DateTime
|[genericlib:GetUtcTime()] / [genericlib:GetLocalDateTime()]
|This mapping will just get the current datetime or current Universal datetime
|Adds a number of days to a date
|Add a number of days mentioned in the parameter to a specific date and returns the output.
|Reformat a date
|Just takes a date and reformat it to a valid format.
|Generate a DateTime
|Both DateFromParts and TimeFromParts allow generating DateTime, by specifying the date and part elements in the parameter.
|Check for Date
|Identifies whether the date passed as a parameter is a valid date or not.
|Days elapsed between two dates
|Returns the number of days or month or year elapsed between two date. Value of range could be “month”, “year”, “day”.
Note: It is worth noting, the transformation engine always parses the DateTime field into its own format, so if you do not specify the format of output, the transformation engine will generate the format and return the result.
APPSeCONNECT is a smart and robust business application integration platform that seamlessly connects all your business applications with each other to streamline operations and facilitate the free flow of data across the platforms. By moving into the region of iPaaS, APPSeCONNECT proves to be a best-in-the-class platform that easily connects systems and automates the business process.
Now, you can easily connect all your business applications under one single platform to automate the business process and increase your productivity and efficiency!