SK SKYVVA Documentation

4. How to use DateTime Mapping?

Introduction

Using a DateTime mapping involves transforming DateTime values from one format to another. Here's a generalized approach to using a DateTime mapping :

Year (YYYY)

Decide on the target format or timezone you want the DateTime to be converted to.

Leverage language-specific libraries or functions designed to handle DateTime objects or strings.

Using a DateTime mapping requires transforming incoming DateTime values from one format to another. In your case, the format received from the target system is in the following six forms:

**

Here's a guideline on how to handle these DateTime formats:

YYYY: Year (four digits)

Users must parse these incoming DateTime strings to extract the individual components (year, month, day, hour, minute, second, milliseconds/microseconds, timezone offset).

Once the user has extracted these components, you can use programming or scripting languages (like Python, JavaScript, etc.) to transform the DateTime into the desired format.

Utilize programming language libraries or built-in functions designed to handle DateTime objects or strings. These often provide methods to efficiently parse, manipulate, and format DateTime values.

Use Case 1: Support format: YYYY-MM-DDThh:mm:ss.xxx+hh:mm (Ex: 2023-03-24T08:57:07.733+02:00)

Expectation: 

SKYVVA application stores DateTime values in a standard manner (UTC), disregarding the timezone component. To match the original DateTime from your system (which includes the timezone offset like +02:00), adjustments are required to align it with the SKYVVA application handling of DateTime.

Following your example:

This adjusted DateTime (2023-03-27T11:55:07.733+00:00) aligns with the SKYVVA application storage convention (UTC without a specified timezone).

Pre-requisite: 

  1. Do Mapping, we need to map the 'Datetime' field to the field that was created in the object.
  1. Push data using data loader go to Integration click details page and click on Data Loader.

Format: YYYY-MM-DDThh:mm:ss.xxx+hh:mm, Ex:(2023-04-04T11:30:07.733+02:00)

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]The current user login now GMT +7 time zone

[/su_box]

Use Case 2: Support format: YYYY-MM-DDThh:mm:ss.xxx-hh:mm (ex: 2023-03-24T08:57:07.733-02:00)

Expectation:

SKYVVA application stores datetime without time zone information (as UTC). To reconcile this difference and make it consistent with the zero time zone, you're subtracting 2 hours from the original time.

Pre-requisite:

  1. Go to Integration click Details Page and click on Data Loader.

Format: YYYY-MM-DDThh:mm:ss.xxx-hh:mm, (Ex: 2023-04-04T14:30:07.733-02:00)

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]The current user login now GMT +7 time zone

[/su_box]

Use Case 3: Support format: YYYY-MM-DDThh:mm:ss+hh:mm, (Ex: 2023-04-04T16:30:07+02:00)

Expectation:

SKYVVA application stores these datetime values without any time zone information (assumed to be in UTC). To align these exported date times with a zero time zone (UTC), you're subtracting 2 hours from the original datetime.

This process helps ensure that when the datetime is displayed to a user in the SKYVVA application, it reflects their local time zone rather than UTC, providing a more meaningful representation of the time.

Pre-requisite:

Format: YYYY-MM-DDThh:mm:ss+hh:mm, (Ex: 2023-04-04T16:30:07+02:00)

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]The current user login now GMT +7 time zone

[/su_box]

Use Case 4: Support format: YYYY-MM-DDThh:mm:ss-hh:mm, (Ex: 2023-04-04T15:30:07-02:00)

Expectation:

SKYVVA application stores these date times without any timezone information (considered as UTC). To reconcile these differences and ensure the date time aligns with a zero time zone (UTC), you're subtracting 2 hours from the original datetime.

Format: YYYY-MM-DDThh:mm:ss-hh:mm, (Ex: 2023-04-04T15:30:07-02:00)

[su_box title="Note" box_color="#2a8af0" title_color="#000000"]The current user login now GMT +7 time zone

[/su_box]

Use Case 5: Support format: YYYY-MM-DDThh:mm:ssZ, (Ex: 2023-03-28T14:16:04Z)

Expectation:

Format: YYYY-MM-DDThh:mm:ssZ, (Ex: 2023-03-28T14:16:04Z)

[su_box title="Result:" box_color="#2a8af0" title_color="#000000"]It will convert DateTime based on the user's time zone.[/su_box]

Use Case 6: Support format: YYYY-MM-DDThh:mm:ss.xxxZ,  (Ex: 2023-03-29T16:16:04.073Z)

Expectation:

When importing data into the SKYVVA application, the platform handles datetime conversion based on various factors, including the user's specified time zone. SKYVVA application is designed to manage datetime fields in a way that accounts for different time zones, ensuring that users see the timestamps adjusted to their local time settings.

Here's how it typically works:

Format: YYYY-MM-DDThh:mm:ss.xxxZ,  (Ex: 2023-03-29T16:16:04.073Z)

[su_box title="Result:" box_color="#2a8af0" title_color="#000000"]It will convert DateTime based on the user's time zone.[/su_box]

Summary

Now users understand the SKYVVA application and utilize the DateTime Mapping to dynamically transform datetime values during data imports or integrations. Configure this feature by defining DateTime Mapping that adjusts timestamps based on specific conditions or calculations, enabling seamless conversion of datetime data to match target formats, time zones, or custom requirements within SKYVVA's mapping interface.

Open this article in the interactive viewer →