Best way to replace :SS with :00

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Best way to replace :SS with :00

probably :
a <- rep("HH:MM:SS", 5)
substring(a, 7) = "00"

Not sure if there is an R way to do this or a regular express way, but here
is what I am trying to do.

I've got lots of data where the format is HH:MM:SS, but I need to format it
like HH:MM:00, i.e. round the second down to zero.

What is the best way to do this?

Thanks again.


        [[alternative HTML version deleted]]

[hidden email] mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.