How to convert month number data into string type

0
Hi,  I am try to convert month (1,2,3,4...) to (‘Jan’, ‘Feb’, ‘Mar’,…..), I am using OQL query select FirstName, CAST ( (DATEPART ( MONTH, Birthday)) AS string )  as Birthday from  "Sales.Customer" but my output is  how to do this please help me
asked
1 answers
2

If you have a DateTime attribute in your entity, instead of using OQL, another approach would be to format it using the formatDateTime function.

formatDateTime($object/Birthday,'MMM')

https://docs.mendix.com/refguide/parse-and-format-date-function-calls/#3-formatdatetimeutc

Hope this helps.

answered