I have data like below:
2018-04-01 00:12:45.823
2018-04-01 00:12:49.897
2018-04-01 00:12:56.207
How to cut them only remain:
00:12:45.823
00:12:49.897
00:12:56.207
We can also use and convert back to time:
mytime<-"2018-04-01 00:12:45.823"
strsplit(mytime," ")[[1]][2]
#[1] "00:12:45.823"
Well, reading this data with read.table
breaks it up "nicely":
mytime<-read.table(text="2018-04-01 00:12:45.823
2018-04-01 00:12:49.897
2018-04-01 00:12:56.207",header=F)
V1 V2
1 2018-04-01 00:12:45.823
2 2018-04-01 00:12:49.897
3 2018-04-01 00:12:56.207
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With