Calc: how to copy a date format in a text string

Sorry if the question is not so clear. I have a spreadsheet with some cells formatted as date and time, but I need to copy those dates and times as are shown in a text string, not the raw numerical, and weird, format that calc transforms them when in the text string.

I think I’m making the wrong formula. This is the link of the spreadsheet, I think you can understand it better if you see it (see the second sheet).

Where you want your values in cell D2 use the TEXT function instead of the cell references.
E.g. for the date instead of C2 use TEXT(C2,“yyyy-mm-dd”) and instead of B2 use TEXT(B2,“hh:mm:ss”)

That’s it, it solved my problem. Thanks a lot!