Hi Ashar,
Please check out the following documentation:
https://docs.mendix.com/refguide/parse-and-format-date-function-calls
It allows you to format a DateTime attribute / variable in any string format.