Replace DateTime with Time in main loop