mercredi 29 juillet 2020

How to change the output of my time_t function in c++? [duplicate]

Currently the function

    time_t now1 = time(0);
    CString AuditDate1 = ctime(&now1);

Exports the time to the database as

Day Mon DD HH:MM:SS YYYY
For Example: Tue Jul 28 14:22:01 2020

I need the time to be outputted as

YYYY.MM.DD HH:MM:SS

I don't even need the time, more importantly the date. The time is a bonus.

Your help is much appreciated!

Aucun commentaire:

Enregistrer un commentaire