Convert Date to DD Mon YYYY

Convert Date to DD Mon YYYY

  

Hello,

I have a date (2017-07-10) and i want to display as 07 October 2017.

I do some research and it say to use this function , FormatMonthDayDateFunction

https://www.outsystems.com/help/servicestudio/9.0/Language_Reference/Built_in_Functions/Formatting_functions/FormatMonthDayDate_Function.htm

So in my expression, i put as FormatMonthDayDate(StartDate, " ") and it say unknown function 'FormatMonthDayDate' in expression. May i know what wrong?


The second parameter is probably the desired format you want.

You probably want something like this:
"dd MMMM yyyy"


Take a look at this page for available formats
https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings

Hi,

can you share what you are doing exactly?

I have done it with no problem..


Solution

Hi,

Use the Builtin function FormatDateTime:

Pass the Date/DateTime in the first parameter and the format in the second "dd MMMM yyyy"

Cheers,
Eduardo Jauch

Solution

Oops, unknown function 'FormatMonthDayDate', didn't see that.


Make sure you have actually referenced the function for use in your current module.

J. wrote:

Hi,

can you share what you are doing exactly?

I have done it with no problem..


I think that at least in OutSystems 10, that function is not a Bultin function...
I couldn't find it anyway.

Just found FormatDateTime

Cheers,
Eduardo Jauch

well, there is that :D

I did it in 9.1 and it was still there (since he used the link with 9.0....)


It's a function in 9.1 and earlier:

But no longer in 10 and up:

It's listed in the Breaking Changes document for P10:

Side Effects


Built-in Functions

1.

Issue: Date and time format built-in functions were replaced by built-in function FormatDateTime, which allows formatting a Date Time value using the specified format. The upgrade process automatically changes existing modules to keep the previous behavior using built-in function FormatDateTime.

Stack: .NET, Java

Rationale: Maintain only one generic function.

Workaround: None.

Jace Jace: I assume you are on P10. Please check the version number of the things you research, so you won't inadvertently assume it's valid for the latest version.

Yes, i am using P10. Thanks for pointing out. Will be careful next time when i research. :)