I am trying to do an if else statement to say if the value is less than 10 add a zero in front, if not leave it as is. I am trying to get all of my dates to be 2 digits. Please assist.
if(df$col < 10){
paste '0'
else df$col
}
I was trying to break it down into different columns
EventID SampleDate SampleTime
130466  3/19/2008   12:30:00
131392  4/30/2008   08:45:00
131658  5/14/2008   10:00:00
117770  6/11/2008   08:45:00
118680  7/23/2008   09:15:00
118903   8/6/2008   09:00:00
SampleDatech year month day2
3/19/2008 2008     3   19
4/30/2008 2008     4   30
5/14/2008 2008     5   14
6/11/2008 2008     6   11
7/23/2008 2008     7   23
 8/6/2008 2008     8    6