SyntaxFix
Write A Post
Hire A Developer
Questions
Try this formula (it will return value from A1 as is if it's not a date):
A1
=TEXT(A1,"mm-yyyy")
Or this formula (it's more strict, it will return #VALUE error if A1 is not date):
#VALUE
=TEXT(MONTH(A1),"00")&"-"&YEAR(A1)