Text files aren't magic: they are literally just a stream of characters which have to be interpreted by the application that reads them to apply any formatting.
Equally, in order to be readable at a later date you have to apply some formatting to your data when you write it to the file.
For example, if you print two dates into a file then what you get is just a string containing a number:
0101202111122022
Unless your application processes that as "two character day, two character month, four character year, character day, two character month, four character year" when it reads it back, it's going to be useless to you. Worse, if you don't specifically add you leading zeros:
11202111122022
then when you try to read it back your app has pretty much no chance at all of getting meaningful data!
The simplest form of formatting is to add line breaks to separate values:
01012021
11122022
Now you app can see where date entries start and end, which makes life a lot easier, both for your app to process, and human beings to read and understand!
One of the simplest ways to format a file is called CSV (Comma Separated Values) and its does exactly what the name suggests: each line is a row of related data items:
1,1,2021,"C programming 101","Room 17"
11,12,2022,"Update Resume",""
You will find a more detailed description of CSV data here:
Comma-separated values - Wikipedia[
^]
But file formats - even for text based files - can get a lot more complicated and useful:
JSON[
^] is very popular, as is
XML[
^] but they take quite some effort to produce / process from scratch!
I'd start by sitting down and working out what you need to store, and thinking about how you need to store it so you can retrieve it sensibly.