I am developing a C++ application on Visual Studio in which I have a string that contains a datetime value and I must convert it into another string with the date and time in the format dd-mm-yyyy HH:MM:SS
For example, if the string sDateTime has the value "1643873040", I must get another string sDateAndTime with the value "02/03/2022, 08:24:00"
I have not found any tutorials or forums that explain how to do this conversion in a C or C++ program developed with Visual Studio and I would appreciate any help or suggestions.
That looks like a “unix time” — seconds elapsed since 1970/01/01. You can use the stuff in <ctime> or in <chrono> for it, or you can get Howard Hinnant’s “date” library for C++ (which I recommend).