I am outputting timestamps (eg. 2012-02-24 13:18:45.552882) and I'd like to remove the last part (here would be .552882) from the output file, so I would only have date and time to the second. How can I do this?

Thanks in advance!