Skip to content

[Feature Request] Handling optional parts in date format #8512

@nicovak

Description

@nicovak

Hello,

I think It could be a nice feature to handle optional parts in date format with []
For example in my case, I can have DateTime with second fractions or not (it's adaptive).

Actually, I need to perform a Substr :

FromDateTime(Substr(JSONPATH(payload, '$.created_at'), 0, 18), 'yyyy-MM-dd''T''HH:mm:ss')

But It could be handled like that :

FromDateTime(JSONPATH(payload, '$.created_at'), 'yyyy-MM-dd''T''HH:mm:ss[.SSS]''Z''')

It's already provided by Java 8 and DateTimeFormatter, in documentation we have :

   [       optional section start
   ]       optional section end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions