Skip to main content
Level 2
Jun 10, 2025 6:40 AM UTC
Question

Change date format

Hi there,

 

I'm trying to change the date the below expression appears which is YYYY-MM-DD to DD MM YYYY in a field in Custom Action. I tried the followings but didn't work. Note this is a piece of code that forms a more complex if/else formula.

1) formatDate

2) toDateOnly

3) date

4) dformat

5) format

 

Expression to solve:

then(concat("on ", (toString(getListItem(sort(#{XXX}, true), 0)))))

 

Thanks!

4 replies

SatheeskannaK
Level 1
Jun 10, 2025 9:04 PM UTC

@ak5 Try along these lines,

 

concat(concat(concat(concat(substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),8,10),"-"),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),5,7)),"-"),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),0,4))

 

Example,
birthdate on the profile:2023-11-27
birthdateFormatted:27-11-2023
Translate
Thanks, Sathees
AK5Author
Level 2
Jun 11, 2025 1:57 AM UTC

Hi @satheeskannak, appreciate the prompt reply! Almost there my bad, i should say the format is 27 Nov 2023. Any ideas? Thanks

 

Translate
Sukrity_Wadhwa
Employee
Jun 18, 2025 8:57 AM UTC

Hi @satheeskannak,

Can you confirm if the suggested solution would work for the new format that @ak5 is asking for?

Thanks!

Translate
Sukrity Wadhwa
Level 2
Jun 10, 2025 8:09 AM UTC

Hi @ak5 ,

 

Are you trying to save the date in a list field?

If so, why don't you read the date parameters directly and then perform the concat expression?

 

Thanks,

Pankaj

Translate