conversion from Mar-2026 to 03-2026 and vice versa
Posted by:
Smith John
Date: January 21, 2026 01:01AM
I am new to PHP & MySQL, struggling to learn the technology (absolute beginner). now I want to convert a VARCHAR column name is SALARY_MONTH, it contains data like: Mar-2025 now I want this in 03-2025 format (vice versa too).
please help to achieve this.
I tried below in PhpMyAdmin Console but it returns NULL.
--- start
SELECT DATE_FORMAT(
STR_TO_DATE('Mar-2025', '%b-%Y'),
'%c-%Y'
) AS result;
--- end
thanks in advance.
Subject
Written By
Posted
conversion from Mar-2026 to 03-2026 and vice versa
January 21, 2026 01:01AM
February 10, 2026 06:19AM
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.