Automation - Datetime value not being stored correctly on Datetime table column

Hello everyone,

I have been developing an automation process in LTS 13.1. More information about the environment will be provided in the next image.

This automation is designed to store a specific datetime value in a Tulip Table column of type Datetime. However, I am encountering an issue where the value saved in the column does not match the value that I configured in the automation.

Below is the definition of the datetime value within the automation:



To test this situation, I decided to create a Text column in the table to store the date using the DATETIMETOTEXT() function and later compare both results. Here is how I developed this part.


Here is the result after executing the automation

The values in both columns are different, and the date in the Datetime column Due Date is incorrect. I tested the method of creating datetimes using the expression texttodatetime('31 12 ' + Variables.Current Year + ' 00:00:00', 'DD MM YYYY HH:mm:ss') in the app editor, and it worked as expected.

Do you know why this is failing, and how can it be resolved?

Thank you in advance for your support.

Regards,

Hi @DaniloArtavia , thank you for reaching out.

I wonder if this could be a timezone problem.

If the timezone settings are accurate and you’re still encountering an issue, let us know and I can make this into a support ticket for you!

Hi @OlgaStroilova ,

Thank you for your reply. I conducted some tests, considering the timezone, but the error persists.

Can you assist me with the support ticket?

Regards,

Regards,

Hi @DaniloArtavia - I just made the ticket for you. You should see it in your email. Ticket # 22924

2 Likes

Hi @Beth,

I received the email, thank you for your support.

1 Like

Following up here with the advice from our Support Team for anyone who finds this thread in the future with a similar question -

The format of all datetimes within your instance are determined by the chosen format in ‘Date and Time’ of ‘Account Settings’. This included datetimes in tables.

The only way to change this format is by enabling Custom Datetime Formats.

The reason you are seeing a difference between the two functions TEXTTODATETIME() and DATETIMETOTEXT() is that they output to different datatypes, one outputs text, while the other a datetime.

For the expression TEXTTODATETIME('31 12' + Variables.Current Year + '00:00:00', 'DD MM YYYY HH:mm:ss') the last bit, DD MM YYYY HH:mm:ss does not refer to how the datetime will be formatted, but instead to how the function should read the incoming text. This is what allows the text to be ‘translated’ into a datetime. If you would like all of your datetimes to be in that format (DD MM YYYY HH:mm:ss ) it will need to be changed in the instance settings.

2 Likes