Q:

How to save and work with data using pointers and list in C

My programs idea is to insert data like this to the program (see below), and save it to a list, so I can keep using it.
Room;Epoch-time;Day;Month;Year;Hour;Minute;Amount
Dining;1577833140;01;01;2020;01;59;0
Dining;1577833200;01;01;2020;02;00;0
...
Bedroom;1569905580;01;10;2019;07;53;0
Bedroom;1569906540;01;10;2019;08;09;2

Node* readFile(Node *pStart, char *fileName) {
    char memory[20], tempName[20];
    FILE *file;
    int i=0;

    file = fopen(fileName, "r");
    if (file == NULL) {
        printf("Failed to read file.\n");
    }

    else {
        while (fgets(memory, sizeof(memory), file) != NULL) {
            sscanf(memory, "%s", tempName);
            if (sscanf(memory, "%s", tempName) == '\0') {
                pStart == AddList(pStart, tempName);
                break;
            }

            pStart = AddList(pStart, tempName);
            i++;
        }

        printf("file '%s' has been read, '%d' rows.\n", fileName, i);
        printf("\n");
        fclose(file);
    }

    return pStart;
}

The problem is, how can I work with the data, so I could compile the data to following form to a txt file:
Room: Bedroom
Date Time Amount
1.9.2019 03:00 0
1.9.2019 03:01 0
...

How can I save the date to its corresponding variable? My current code for saving the file is, but it does not work:
NodeResult *SaveResult(NodeResult *pStartResult, char *name) {
    FILE *file;
    NodeResult *ptr = pStartResult;
    file = fopen(name, "w");
    if (file == NULL) {
        printf("Filed to write to the file.\n");
    }

    else {
        fprintf(Date Time Amount\n");
        while (ptr != NULL) {
            fprintf(%02d%02d%02d\n", ptr->date, ptr->Time, ptr->Amount);
            ptr = ptr->pNextResult;
        }

        printf("File saved\n");
        printf("\n");
        fclose(file);
    }

    return pStartResult;
}

A:

You can convert Epoch time to a struct tm representing

UTC using the function gmtime.
local time using the function localtime.

Afterwards, you can use fprintf with the individual members of the struct tm to accomplish what you want.
Assuming that you make ptr->epoch_time of type time_tcontaining the Epoch time, you can change your while loop to the following:
while (ptr != NULL) {
    struct tm *p = localtime( &ptr->epoch_time );
    assert( p != NULL );
    fprintf(
        file,
        "%d.%d.%d %02d:%02d %d\n",
        p->tm_mday, p->tm_mon, p->tm_year,
        p->tm_hour, p->tim_min,
        ptr->Amount
    );
    ptr = ptr->pNextResult;
}

However, as far as I can tell, your parsing of the input is also not working. Instead of using sscanf, I suggest you consider using strtok to split the input fields using ';' as the deliminator character.

