Sorry, looking back maybe I misread your first post - do you want a text file where the data is laid out in a table or did you want an actual html table?
For the first, you probably want to pad each field with spaces so they're all the same width then add a tab between each field.
cout << setw(15) << mytime << "\t" << setw(15) << myname << "\t" << setw(15) << myage << endl;
For html output:
cout << "<table><th>Date</th><th>Name</th><th>Age</th>" << endl;
cout << "<tr><td>date</td><td>name</td><td>age</td></tr> << endl;
The examples are illustrative more than usable