I am inserting a record into data extension from the form values where I have a date field in dd/mm/yyyy format. As Marketing Cloud is not accepting the value in this format, is there any way where we can format the date from dd/mm/yyyy to mm/dd/yyyy.

MM/dd/yyyy to dd/MM/yyy is working.

%%=Format("03/28/2017", "dd/MM/yyyy")=%%

Output: 28/03/2017

I want something like this dd/MM/yyyy to MM/dd/yyyy

%%=Format("28/03/2017", "dd/MM/yyyy")=%%

Output should be: 03/28/2017


SFMC uses the standard C# date formatting library, so you have to convert the input string to a date first.

%%=Format(StringToDate("28/03/2017"), "MM/dd/yyyy")=%%

Output: 03/28/2017

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.