Plotting logs to a graph

I think this is the right forum for this although Im not sure what program to use here.

Ive taken logs of temperatures and of other statuses. The temp logs occur everything 30minutes but the other log occur when they change state. Each event is a new line in the file. So if I import these two files the rows will not match in the date/time stamps. So unless I manually rearrange the data I wont get a suitable graph as each row of both plots will be different times.

Is there a way to take the two files, rearrange the data in time order and then plot a graph? Ive used excel to plot the temperature graph which works fine but I dont know how I can use this to arrange the data.

The two logs are like this


and this


I dont think I can put the data into one file because then when I import it the columns will be a mixture of both files (and other files).

As you can see the second log times are not the same as the first log, but if I import these next to each other and try to plot the graph in excel the rows times go out of sync straight away

I know the easiest way to do it would be to log the other values at the same time but then it doesnt catch when the events occur.

if you have the two files a.csv and b.csv you can just copy them (assuming PC) this way

type a.csv b.csv > c.csv

type c.csv

then you can read in c.csv with Excel , sort and graph them

another option could be writing a small python program...