Convert MMM yyyy to Date time
Question
Application Type
Reactive

Hello, I would like to convert from MMM yyyy to dd-MM-yyyy

Jan 2021 to 01-01-2021

But I could not do that with formatdatetime

TextToDate(FormatDateTime(TextToDate(ExcelToRecordList1.Current.ExcelRawMaterialList2.Month),"01-MM-yyyy"))

mvp_badge
MVP
Solution

Hi Veronica,


You can very easily use JavaScript to do this conversion:



Using the snippet above you will have a Date as an output.

I add here an OML file as an attachment, so you can see a working example.


After having the date as a Date field, you can then use the FormatDateTime built-in function to format the date to your need.


Kind Regards,
João

ReactiveSandbox8_TestConvertToDate.oml

Hi Veronica,

Can you please share your oml file ?

or you can refer below solution.

https://www.outsystems.com/forums/discussion/53345/how-to-show-date-in-dd-mm-yyyy-format-when-selected-from-calendar/


hope it helps  you.

Regards,

Ajit Kurane.

mvp_badge
MVP
Solution

Hi Veronica,


You can very easily use JavaScript to do this conversion:



Using the snippet above you will have a Date as an output.

I add here an OML file as an attachment, so you can see a working example.


After having the date as a Date field, you can then use the FormatDateTime built-in function to format the date to your need.


Kind Regards,
João

ReactiveSandbox8_TestConvertToDate.oml

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