Convert date in text to group by year
Application Type

Hi all,

I am new to outsystems.

In my requirement date is in text format "mm/dd/yyyy" . I want to group by column only year .

I used  year(TexttoDate("mm/dd/yyyy")) but it's not working for me.

please correct me if I am wrong.


Hi Ankur,

Try this SubStr("2/22/2019",length("2/22/2019")-4,4) You will get 2019 as output.

Hope this helps.


Thanks It's work for me...

Dear Ankur 

Greetings for the day!

You can use Date and Time build in functions to get the Results -

To make it Group by. You can group by Date and use Year(DateTime) to get the YEAR Results

Year(DateTime)Returns the year of 'dt'.

Let me know if have any questions.

Hi @Ankur Jain 

While the answer given by Samiksha works for you it is not that easy to read and can cause some issues.

If you don't have any way to receive that date in the Date format, I highly recommend using the TextToDateTime() function and then use the functions Manish just shared.

I've also edited the title of your post. Please be mindful of other Community members that are trying to help you by being more detailed on the title of your question.

Correct Christiana 

Thanks for sharing the recommended solution. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.