String to Date and Time

Hello knimers,

could you help me to create a formula to create a date of the given strings of columns server_ts and device_ts ?


Hi @8bastian8, as your fractions of seconds can vary between 6 digits and 3 digits, the following mask should work, which will also allow for month and day being either 1 or 2 digits:

yyyy-M-d H:m:s.[SSSSSS][SSSSS][SSSS][SSS]

if your fractions of seconds can go down to single digit, then use:

yyyy-M-d H:m:s.[SSSSSS][SSSSS][SSSS][SSS][SS][S]

This provides an optional format mask where it will try 6 digits, then 5, then 4 and so on until it finds a match


wonderful solution @takbb !

Thank you very much for your help, it works :slight_smile:


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.