There are a number of ways to do to this, but it is probably easiest is to set up logic to execute system function SFC 1 (READ_CLK) to read the system clock whenever the compressor starts or stops. The output of this function will be placed in a tag with the format Time_of_Day. This tag will then need to be parsed to extract the hours, minutes, seconds, etc., but it is pretty easy to do (search the Siemens support site for SFC1). There are examples of this using SCL on the support site.
You will then need to create an array to store the corresponding start and stop times so that they can be displayed on WinCC.
You can also read the PLC clock in milleseconds since midnight directly from the PLC and then "calculate" the time in WinCC using a C script.
Finally, you could just read the compressor tag which holds the compressor status and capture the time whenever WinCC sees that the state has changed. Then a script can place that data into a database for documenting the start and stop times.