I've tried to convert it into String but no luck. I do see that the error is saying about some string type not String but still.
Is there anyway to make it work the second example is shown?
Indeed. You have to use time::format_description::parse() if you want to pass a string value rather than a string literal. Unlike time::macros::format_description!() this will return a Result rather than give an error at compile time in case of an invalid format description.
If your goal is merely to avoid the need to copy-paste the string literal, and you don’t actually need to parse run-time-generated format strings, you can put the result of the format_description macro call in a const instead, avoiding the run-time overhead of using time::format_description::parse():