cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot format date to e.g. 1st Mar 2025

rabbanir
Level 4

Hi,

I want to format a date from 01 Mar 2025 to 1st Mar 2025, 21 Mar 2025 to 21st Mar 2025 etc.

I've tried looking at formatdate but cannot find the correct pattern, in fact I don't think blue prism recognises 1st Mar 2025 as a valid date so is it even possible with the formatdate function? Any help on this would be appreciated,

2 REPLIES 2

Hi @rabbanir 

To get the ordinal suffix(st,nd,th,rd) you might have to create a custom VB code and then concatenate it using expression in the calculation stage.

Do let me know if this works for you, will share the detailed steps.

Best Regards,

Sayeed Bin Abdullah 

Senior Consultant - Automation Developer
Wonderbotz

Hi @rabbanir 

If you want to transform 1st Mar 2025 to 01 Mar 2025 you need a custom code or a string manipulation with Instr and Mid.

But if you need to transform 01 Mar 2025 to 1st Mar 2025 you can use this :

FormatDate("01 Mar 2025","dd")&"st "&FormatDate("01 Mar 2025","MMM")&" "&FormatDate("01 Mar 2025","yyyy")

your output will be a TEXT