Connect with us and enhance your M-Files experience using Unitfly Toolkit for M-Files. Here’s how to get started.
Hello, Unitfly Community!
I’ve been using the `<<SUBSTRING>>` function in **Extended Auto Properties** to transform dates from an American format (e.g., `10/23/2024`) into a German format (`23.10.2024`). However, I’ve noticed a behavior change since version **EK 5.2** (and still in **5.4.1**), and I’m curious if anyone else has experienced this or can shed some light on it.
Here’s the logic I initially used, which worked perfectly before version 5.2:
<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','3','2')>>.<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','1','2')>>.<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','6','4')>>
Starting from version 5.2, I had to adjust it as follows:
<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','3','2')>>.<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','0','2')>>.<<SUBSTRING('%PROPERTY_{PD.T.DatumText}%','6','4')>>
The Oddity:
- The **first** and **third** parts of the function (`day` and `year`) **remain unchanged**, regardless of the version.
- Only the **second part** (`month`) required a shift from `1` to `0`.
This suggests that there might have been a change in how the function starts "counting" characters. Did the `<<SUBSTRING>>` function shift from a **1-based index** to a **0-based index** for certain parameters?
Has anyone else run into this issue, and do you know if this change was intentional or documented? Any insights would be greatly appreciated!
Cheers,
Daniel
So, you came to the end of the page. This means you are passionate about technology as we are.
WATCH THE WEBINAR